Enable git diff-tree with empty second tree-ish param #740
Closed
gangefors wants to merge 2 commits intogitpython-developers:masterfrom
Closed
Enable git diff-tree with empty second tree-ish param #740gangefors wants to merge 2 commits intogitpython-developers:masterfrom
gangefors wants to merge 2 commits intogitpython-developers:masterfrom
Conversation
Executing `git diff-tree` and omitting the second tree-ish argument wasn't possible before. This commit enables this behaviour by allowing the caller to send in an empty string. Allowing an empty string keeps backwards compatibility for all other allowed input types.
Author
|
It might be that the thing I'm trying to achieve here is the same result I get if I use |
Member
|
@gangefors Thanks for your effort :)! It’s hard for me to tell if git.diff.NULL_TREE would have the same result, just because I am not on a ‘real’ computer right now. However, if that was the case the test provided here would work similarly, which is something you could check. If it’s not the same, I would prefer to see the empty string become some constant, like |
Member
|
Thanks a lot for your contribution thus far ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executing
git diff-treeand omitting the second tree-ish argumentwasn't possible before. This PR enables this behaviour by allowing
the caller to send in an empty string.
Allowing an empty string keeps backwards compatibility for all other
allowed input types.