Skip to content

Enable git diff-tree with empty second tree-ish param #740

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

Closed
wants to merge 2 commits into from

Conversation

gangefors
Copy link

@gangefors gangefors commented Mar 27, 2018

Executing git diff-tree and omitting the second tree-ish argument
wasn'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.

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.
@gangefors
Copy link
Author

It might be that the thing I'm trying to achieve here is the same result I get if I use git.diff.NULL_TREE. Feel free to ignore and close if that is the case.

@Byron
Copy link
Member

Byron commented Apr 3, 2018

@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 git.diff.PARENT_TREE.

@Byron
Copy link
Member

Byron commented Sep 28, 2019

Thanks a lot for your contribution thus far !
I am closing this PR due to prolonged inactivity. Please feel free to reopen it in case it can proceed.

@Byron Byron closed this Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants