You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(The following applies to the GitRetriever).
In case the source branch has already been merged into the target branch before, dco-check silently fails:
Note that the no-ff flag is needed, otherwise a fast-forward merge is done and dco-check doesn't fail in that case.
Could it be related to this note in the manual of git-merge-base?
Also, the remote-tracking branch you use the --fork-point mode with must be the one your topic forked from its tip. If you forked from an older commit than the tip, this mode would not find the fork point (imagine in the
above sample history B0 did not exist, origin/master started at B1, moved to B2 and then B, and you forked your topic at origin/master^ when origin/master was B1; the shape of the history would be the same as above, without
B0, and the parent of B1 is what git merge-base origin/master topic correctly finds, but the --fork-point mode will not, because it is not one of the commits that used to be at the tip of origin/master).
I'm note sure what dco-check could do in this case...
Maybe if merge-base --fork-point failed, we should fallback to using git merge-base master topic?
Thanks for reporting this, it's a pretty specific use-case!
In case the source branch has already been merged into the target branch before, dco-check silently fails:
Detected: git (default)
using default branch 'master'
error:
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.
Maybe if merge-base --fork-point failed, we should fallback to using git merge-base master topic?
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/[email protected]/t/The text was updated successfully, but these errors were encountered: