Skip to content

Commit 6cf104e

Browse files
committed
goodnight.sh: sync nightly to current remote branch, not current commit
often would have unpushed commits (because unfinished, eg need rebase/fixup etc), and they wouldn't be in the current remote branch, but would end up in nightly and in the remote nightly, which we do not want. Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent dce7a22 commit 6cf104e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

goodnight.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
set -e
44

5-
git branch -f nightly @
5+
# sync 'nightly' with the current branch in remote (that has been pushed)
6+
#
7+
# we don't want the local version of the current branch,
8+
# because if we haven't pushed new commits into remote yet
9+
# (thru current branch), we don't want to push thru nightly either.
10+
#
11+
CURR_BRANCH_PUSHED="origin/$(git branch --show)"
12+
git branch -f nightly "$CURR_BRANCH_PUSHED"
613
git push -f origin nightly
714

815
# create a git hook for this repo

0 commit comments

Comments
 (0)