Adding LFS tracked files to index
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 408
- 平均合并
- 2 天 57 分钟
- 30 天内合并 PR
- 7
描述
I'm writing a script to take snapshots from SVN URLs and add them to Git in a subfolder. Bringing LFS into the fold it seems like calling Repository.index.add_all isn't working quite right. The files that should be tracked seem to get put in to .git/lfs/objects as expected, but git lfs ls-files doesn't list any files. I changed this line of my code
repo.index.add_all([projectPath])
to this
check_call(["/usr/bin/git","add","--all",projectPath])
repo.index.read()
And that's fixed it, but I'd prefer to have the code self contained with library calls.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 repo.index.add_all([projectPath]) 重现 snapshot 流程,并将其与所示的 git add --all 命令及随后执行的 repo.index.read() 进行比较。使用 git lfs ls-files 检查生成的 index;完成的标准是,仅使用库的路径能够等效地记录由 LFS 跟踪的文件。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, python
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100