Skip to content

Expose the assume-unchanged flag to IndexEntry #928 #929

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

Merged
merged 3 commits into from
Jan 23, 2015

Conversation

zpete
Copy link
Contributor

@zpete zpete commented Jan 23, 2015

Didn't know where to put the constant GIT_IDXENTRY_VALID to - I hope LibGit2Sharp/Core/GitIndexEntry.cs is the right place.
This is my first Pull request, so bear with me.

Created through the following

$ git init assume_unchanged_wd && cd assume_unchanged_wd

$ echo "hello" > hello.txt
$ echo "world" > world.txt

$ git add .
$ git commit -m "Initial commit"

$ echo "Hello" > hello.txt
$ echo "World" > world.txt

$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   hello.txt
        modified:   world.txt

no changes added to commit (use "git add" and/or "git commit -a")

$ git update-index --assume-unchanged world.txt

$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   hello.txt

no changes added to commit (use "git add" and/or "git commit -a")
@@ -31,6 +31,11 @@ public class IndexEntry : IEquatable<IndexEntry>
public virtual StageLevel StageLevel { get; private set; }

/// <summary>
/// Whether the file is marked as assume-unchanged
/// </summary>
public bool AssumeUnchanged { get; private set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mark this property as virtual. This should allow the build to pass 😉

@nulltoken
Copy link
Member

Beside the tiny nitpick above, I ❤️ this very much 👍

One thing would be even awesomer: While amending your commit, could you please reword its commit message so that the reference to the issue is on the third line? Hint: If you write Fix #928 instead of Issue #928, the initial issue will be automatically closed once this commit is merged.

Something like this maybe

Expose the assume-unchanged flag to IndexEntry

Fix #928 

Another thing. You may be willing to update your GitHub profile and add the email address you've used in this commit as a known one. This way, your contributions will be linked to your GitHub account.

@nulltoken
Copy link
Member

🆒

One last request. As the second commit is only a fixup of the first one, would you please squash them together?

@zpete zpete force-pushed the zpete/assume_unchanged branch from fdcacc9 to 6f16791 Compare January 23, 2015 20:24
@zpete
Copy link
Contributor Author

zpete commented Jan 23, 2015

Thank you very much for all the useful help. I hope everything is fine with
the Pull request now. Let me know if something is still wrong ;-)

On Fri, Jan 23, 2015 at 8:44 PM, nulltoken notifications@github.com wrote:

[image: 🆒]

One last request. As the second commit is only a fixup of the first one,
would you please squash them together?


Reply to this email directly or view it on GitHub
#929 (comment).

@carlosmn
Copy link
Member

👍 as we get more flags, we'd eventually want to create its own type, like we have for the other flags, but for one it's fine as it is.

@nulltoken
Copy link
Member

👍 for me as well.

nulltoken added a commit that referenced this pull request Jan 23, 2015
Expose the assume-unchanged flag to IndexEntry
@nulltoken nulltoken merged commit 27411bf into libgit2:vNext Jan 23, 2015
@nulltoken
Copy link
Member

@zpete ✨ ✨ ✨ ✨ ✨ ✨ ✨ ‼️

@nulltoken nulltoken added this to the v0.21 milestone Jan 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants