Commit 2e14988
committed
keepalive: fix merging upstream
When upstream truly diverged from the downstream repository, a merge
base needs to be determined, otherwise the merge will fail with:
fatal: refusing to merge unrelated histories
Unfortunately, merge base calculation will also fail when one of the
branches is _shallow_, in which case the error message is actually
highly misleading.
Let's just ensure that we do not have a shallow clone when running in a
fork. There would be an opportunity to make this logic smarter, by using
the GitHub REST API to check whether there _are_ upstream commits that
aren't reachable from the downstream HEAD, but https://xkcd.com/1205/...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 8e3ff0b commit 2e14988
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments