Skip to content

Commit

Permalink
sync-upstream: Use --autostash to handle uncommitted changes
Browse files Browse the repository at this point in the history
This makes it possible to use sync-upstream with uncommitted changes. (This
is in particular helpful when working on the script itself.)

Without this commit, git pull will fail due to the uncommitted changes.
  • Loading branch information
real-or-random committed Apr 11, 2023
1 parent 1d25608 commit cd834f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/sync-upstream.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -eou pipefail
set -xeou pipefail

help() {
echo "$0 range [end]"
Expand Down Expand Up @@ -97,7 +97,7 @@ echo "$BODY"
echo "-----------------------------------"
# Create branch from PR commit and create PR
git checkout master
git pull
git pull --autostash
git checkout -b temp-merge-"$PRNUM"

# Escape single quote
Expand Down

0 comments on commit cd834f7

Please sign in to comment.