libgit2 / libgit2/libgit2sharp
Git stash pop behaviour with
未关闭
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 3.5k
- 派生
- 925
- PR 合并指标
- 30 天内没有已合并 PR
描述
Reproduction steps
- In branch A with master as remove we have a new file untracked.
- In master we have added the same file already and it's part of commit a123
we are updating branch A to the commit a123 so we are doing:
var stash = repository.Stashes.Add(signature, StashModifiers.IncludeUntracked);
repository.Merge('a123', signature);
if (stash != null)
{
repository.Stashes.Pop(0);
}
if(repository.Index.Conflicts.Any()){
showUserAllTheConflictsAndGiveOptionsToFixThem
}
Expected behavior
When doing the Pop the change should get marked as having a conflict and being modified
Actual behavior
There won't be any conflicts even though the file is marked as modified and has been modified with the conflict markers
Version of LibGit2Sharp (release number or SHA1)
0.27.0-preview-0034
Operating system(s) tested; .NET runtime tested
Windows Server 2012; .NET 4.7.2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 LibGit2Sharp 0.27.0-preview-0034 上,使用带有 IncludeUntracked 的 repository.Stashes.Add、repository.Merge、repository.Stashes.Pop(0) 和 repository.Index.Conflicts 重现该情况。首先检查未跟踪文件与已跟踪文件发生冲突时 stash pop 如何报告冲突,然后验证该冲突会通过索引暴露出来,同时工作文件仍处于带有冲突标记的修改状态。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, git
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100