Ensure that conflicts are staged and never ignored#1062
Conversation
Staging should ignore files that are ignored, unless the file already exists in the repository. Additional tests to validate this.
168aa2c to
92946fe
Compare
A file should be ignored when it does not exist in the repository, but conflicts should absolutely qualify as "existing in the repository". Ensure that we can stage ignored files correctly.
92946fe to
6b0a0a5
Compare
|
You know, some days I forget that we're building a tool that actively punishes Windows users for using two bytes to represent line endings instead of one. |
6b0a0a5 to
3d5ddee
Compare
|
So after digging in here: the |
|
In case it's not clear, I favor a comprehensive solution to the tests issue at hand (the issue being that it's not super clear what the EOL settings are). But this seems like a reasonable stopgap measure until we can be more comprehensive. |
LibGit2Sharp/TreeEntryChanges.cs
Outdated
There was a problem hiding this comment.
Would there be a way to improve this documentation to help the user understand what we mean by "exists"?
I had to go through libgit2/libgit2#3139 in order to actually get it.
There was a problem hiding this comment.
I added additional documentation here, does this clarify this concept?
|
Would this fix #881? |
3d5ddee to
0a72fc9
Compare
LibGit2Sharp/TreeEntryChanges.cs
Outdated
Introduce conflict data to status and diff information. Introduce staging of conflicts.
0a72fc9 to
49f9530
Compare
|
Awesome. Thanks! |
Ensure that conflicts are staged and never ignored
Like libgit2/libgit2#3139, LibGit2Sharp erroneously does not stage conflicted files, if the filenames match
.gitignore. Update stage to take conflict data into account.