Skip to content

Commit 094cddc

Browse files
committed
goodnight.sh: push nightly to current *commit* of current branch, not branch itself
otherwise would end up tracking the remote branch as own remote branch, instead of just overridding the commit.
1 parent 45d2e54 commit 094cddc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

goodnight.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ set -e
99
# (thru current branch), we don't want to push thru nightly either.
1010
#
1111
CURR_BRANCH_PUSHED="origin/$(git branch --show)"
12-
git branch -f nightly "$CURR_BRANCH_PUSHED"
12+
CURR_BRANCH_PUSHED_COMMIT=$(git rev-parse "$CURR_BRANCH_PUSHED")
13+
git branch -f nightly "$CURR_BRANCH_PUSHED_COMMIT"
1314

1415
LOCAL_NIGHTLY="$(git rev-parse nightly)"
1516
REMOTE_NIGHTLY="$(git rev-parse origin/nightly)"

0 commit comments

Comments
 (0)