-
Notifications
You must be signed in to change notification settings - Fork 899
Diff.Compare overload to include untracked changes #359
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
@@ -201,11 +201,11 @@ public virtual TreeChanges Compare(Tree oldTree, DiffTargets diffTargets, IEnume | |||
/// </summary> | |||
/// <param name = "paths">The list of paths (either files or directories) that should be compared.</param> | |||
/// <returns>A <see cref = "TreeChanges"/> containing the changes between the working directory and the index.</returns> | |||
public virtual TreeChanges Compare(IEnumerable<string> paths = null) | |||
public virtual TreeChanges Compare(IEnumerable<string> paths = null, bool includeUntracked = 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.
Could you please add some Xml documentation describing the new parameter?
Nice addition! Could you please squash the two commits together so the new feature and the covering test become part of the same commit? |
Thanks. |
Don't worry, the API won't be locked in before version v1.0. Next official release will be v0.10
Unless I'm wrong, I think the |
Manually merged! ✨✨✨✨✨✨✨✨✨✨✨ |
Thanks! |
Could you consider deploying this on the other Compare overload |
Forget my last comment, I will do it in #343 to avoid merge conflict at a later stage 😉 |
Even better, forget my last two comments: we already always include untracked files for this overload, when we are diffing between a My bad. |
It seems odd to me that untracked changes aren't included by default when comparing the working tree against the index. The other ways I could find to obtain them were much more roundabout.
(I'm new to the project so please decline and tell me if there's a better way to do this already.)