File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 66COMMAND=" $CPPSM /commands/$1 "
77
88if [ $# = 0 ] || [ ! -x " $COMMAND " ]; then
9+ BRANCH=" $( git -C " $CPPSM " symbolic-ref --short HEAD) "
10+
11+ ORIGIN=" $( git -C " $CPPSM " log --pretty=oneline --abbrev-commit " ..origin/$BRANCH " | sed ' s#^# #g' ) "
12+ if [ -n " $ORIGIN " ]; then
13+ ORIGIN=" $( cat << EOF
14+
15+ Origin:
16+ $ORIGIN
17+ EOF
18+ ) "
19+ fi
20+
21+ git -C " $CPPSM " fetch --quiet
22+
923 # shellcheck disable=SC2035
1024 COMMANDS=" $( cd " $CPPSM /commands" && echo * ) "
1125 COMMANDS=" ${COMMANDS// / |} "
@@ -16,9 +30,9 @@ Run any command with --help to see a brief description of the command.
1630
1731Visit https://cppsm.github.io/ for full documentation.
1832
19- Branch: $( git -C " $CPPSM " symbolic-ref --short HEAD )
33+ Branch: $BRANCH
2034$( git -C " $CPPSM " log -n 5 --pretty=oneline --abbrev-commit | sed ' s#^# #g' )
21-
35+ $ORIGIN
2236EOF
2337 exit 1
2438fi
You can’t perform that action at this time.
0 commit comments