mirror of
https://gitlab.com/xonotic/xonotic
synced 2024-12-14 19:05:09 +00:00
upstream rebase detection: verify that one of the two commits is upstream
This commit is contained in:
parent
3747fecced
commit
7f21fe50c7
11
all
11
all
@ -269,6 +269,17 @@ fix_upstream_rebase()
|
||||
if [ -z "$r_me" ] || [ -z "$r_other" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# one of the two sides of the merge should be remote upstream, or all is fine
|
||||
r_r=`git symbolic-ref HEAD`
|
||||
r_rem=`git config "branch.$r_rem.remote" || $ECHO origin`
|
||||
r_bra=`git config "branch.$r_bra.merge" || $ECHO "$r_r"`
|
||||
if [ x"$r_me" != x"`git rev-parse "$r_rem/$r_bra"`" ]; then
|
||||
if [ x"$r_other" != x"`git rev-parse "$r_rem/$r_bra"`" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
r_base=`git merge-base "$r_me" "$r_other"`
|
||||
|
||||
# no merge-base? upstream did filter-branch
|
||||
|
Loading…
Reference in New Issue
Block a user