mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
scripts/git: Stop failing when upstream branches don't exist
If you add a custom remote, or a new branch, and don't fetch first, then the script would fail when checking for unchanged branches. Instead, skip the check: a new branch is definitely a change.
This commit is contained in:
parent
3864536b7c
commit
7ee1e16c6f
@ -251,7 +251,8 @@ if [ "$PUSH_SAME" -eq 0 ]; then
|
||||
PUSH_COMMIT=$(git rev-parse "$b")
|
||||
SKIP_UPSTREAM=
|
||||
for u in $UPSTREAM_SKIP_SAME_AS; do
|
||||
UPSTREAM_COMMIT=$(git rev-parse "$u")
|
||||
# Skip the branch check on error
|
||||
UPSTREAM_COMMIT=$(git rev-parse "$u" 2>/dev/null) || continue
|
||||
if [ "$PUSH_COMMIT" = "$UPSTREAM_COMMIT" ]; then
|
||||
SKIP_UPSTREAM="$u"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user