Skip to content

Commit d9bb526

Browse files
committed
check-branch.sh: fix bug when branch name has a /
1 parent 9f53c7f commit d9bb526

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

check-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
commits=$@
77

88
remote=$(git rev-parse --symbolic-full-name HEAD@{u})
9-
remote=${remote%/*}
109
remote=${remote#refs/remotes/}
10+
remote=${remote%%/*}
1111
headBranch=$(git remote show "$remote" | grep HEAD | sed 's/ *HEAD branch: //')
1212

1313
test "$commits" || commits=$(git rev-list HEAD "^$headBranch" | sed '1!G;h;$!d')

0 commit comments

Comments
 (0)