-
Notifications
You must be signed in to change notification settings - Fork 897
Ensure that conflicts are staged and never ignored #1062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
@@ -47,6 +49,11 @@ internal TreeEntryChanges(GitDiffDelta delta) | |||
public virtual ObjectId Oid { get; private set; } | |||
|
|||
/// <summary> | |||
/// The file exists (this is not a deletion.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added additional documentation here, does this clarify this concept?
Would this fix #881? |
3d5ddee
to
0a72fc9
Compare
/// <summary> | ||
/// The file exists in the old side of the diff. | ||
/// This is useful in determining if you have an ancestor | ||
/// side to a conflict. This will be flase during a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/flase/false/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
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.