File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1010
1111# bail out with message to stderr and exit status 1
1212die () {
13+ # shellcheck disable=SC2086
1314 echo " $( basename $0 ) :" " $@ " 1>&2
1415 exit 1
1516}
@@ -20,6 +21,7 @@ shortsha() {
2021}
2122
2223# show usage
24+ # shellcheck disable=SC2166
2325[ -z " $1 " -o " $1 " = " --help" ] && {
2426 grep ' ^#/' " $0 " | cut -c4-
2527 exit 2
@@ -44,6 +46,7 @@ remote=$(git config --get "branch.$current.remote" || true)
4446merge=$( git config --get " branch.$current .merge" | sed ' s@refs/heads/@@' )
4547
4648# build up a sane <remote>/<branch> name
49+ # shellcheck disable=SC2166
4750if [ -n " $remote " -a -n " $merge " ]
4851then tracking=" $remote /$merge "
4952elif [ -n " $merge " ]
@@ -63,5 +66,7 @@ git reset -q --hard "$tracking"
6366git checkout -q " $branch "
6467git branch --set-upstream " $branch " " $tracking "
6568git reset -q --hard " $sha "
69+ # shellcheck disable=SC2086,SC2046
6670echo " [$( shortsha " $sha " ) ...$( shortsha $( git rev-parse $tracking ) ) ] $current "
71+ # shellcheck disable=SC2046
6772echo " [0000000...$( shortsha $( git rev-parse HEAD) ) ] $branch "
You can’t perform that action at this time.
0 commit comments