-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fails when source branch has been merged in the target branch before #113
Comments
Thanks for reporting this, it's a pretty specific use-case!
The error message could definitely be improved as a starting point. It should at least mention what/where the error happened and include the command error message/stderr output, if any.
I think this is reasonable. If you could open a PR with this fix that would be great, otherwise I'll get to it at some point! |
(The following applies to the GitRetriever).
In case the source branch has already been merged into the target branch before, dco-check silently fails:
This is because the
git merge-base --forkpoint master
command returns nothing (and exits with 1):It's relatively easy to reproduce with an empty repo:
Note that the
no-ff
flag is needed, otherwise a fast-forward merge is done anddco-check
doesn't fail in that case.Could it be related to this note in the manual of
git-merge-base
?I'm note sure what
dco-check
could do in this case...Maybe if
merge-base --fork-point
failed, we should fallback to usinggit merge-base master topic
?EDIT: it looks like there could be multiple reason why
--forkpoint
would fail: https://public-inbox.org/git/xmqq7ewckbpk.fsf@gitster.mtv.corp.google.com/t/The text was updated successfully, but these errors were encountered: