Skip to content
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

Git 2.28 no longer permits diff with ... on unrelated branches #12364

Merged
merged 3 commits into from
Jul 29, 2020

Conversation

zeripath
Copy link
Contributor

Annoyingly git 2.28 now strictly enforces that when doing git diff base...head base and head must have a merge-base. Unfortunately this is a breaking change as previously this would just fall back to git diff base head. Therefore we need to detect this new error and handle it.

In preparation for further changes I have also predicted that rev-list base...head may break in future too. Therefore I have attempted to protect against this too.

1.12 will also be affected by this and therefore we should backport these changes if possible.

Closes #12362

Signed-off-by: Andrew Thornton art27@cantab.net

Signed-off-by: Andrew Thornton <art27@cantab.net>
@6543

This comment has been minimized.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 29, 2020
modules/git/repo_compare.go Outdated Show resolved Hide resolved
@zeripath
Copy link
Contributor Author

OK try again - I missed checking the stderr properly

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

🚀

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 29, 2020
zeripath added a commit to zeripath/gitea that referenced this pull request Jul 29, 2020
Backport go-gitea#12364

Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick pushed a commit that referenced this pull request Jul 29, 2020
Backport #12364

Signed-off-by: Andrew Thornton <art27@cantab.net>
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 29, 2020
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

block - patch failed - investigate ...

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

ok 🚀 (it had nothing to do with the git 2.28 problem)

@techknowlogick techknowlogick merged commit 2f6aadf into go-gitea:master Jul 29, 2020
@techknowlogick techknowlogick added the backport/done All backports for this PR have been created label Jul 29, 2020
@zeripath zeripath deleted the fix-git2.28 branch July 29, 2020 18:49
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants