|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -# git-branch-status - print pretty git branch sync status reports |
4 | | -# |
5 | | -# please direct comments, bug reports, or feature requests to the upstream repo: |
| 3 | +# please direct comments, bug reports, feature requests, or PRs to the upstream repo: |
6 | 4 | # https://github.com/bill-auger/git-branch-status/issues/ |
| 5 | + |
| 6 | +# git-branch-status - print pretty git branch sync status reports |
7 | 7 | # |
8 | 8 | # Copyright 2014 Jehiah Czebotar <https://github.com/jehiah> |
9 | 9 | # Copyright 2013 Fredrik Strandin <https://github.com/kd35a> |
|
21 | 21 | # |
22 | 22 | # You should have received a copy of the GNU General Public License version 3 |
23 | 23 | # along with git-branch-status. If not, see <http://www.gnu.org/licenses/>. |
24 | | -# |
| 24 | + |
25 | 25 | # credits: |
26 | 26 | # * originally by Jehiah Czebotar |
27 | 27 | # * "s'all good!" message by Fredrik Strandin |
@@ -109,10 +109,10 @@ readonly CEVEN=$CGREEN |
109 | 109 | readonly CNOUPSTREAM=$CRED |
110 | 110 | readonly CNOLOCAL=$CRED |
111 | 111 | readonly HRULE_CHAR='-' |
112 | | -readonly JOIN_CHAR='_' |
| 112 | +readonly JOIN_CHAR='~' |
113 | 113 | readonly JOIN_REGEX="s/$JOIN_CHAR/ /" |
114 | | -readonly STAR="*" |
115 | | -readonly DELIM="|" |
| 114 | +readonly STAR='*' |
| 115 | +readonly DELIM='|' |
116 | 116 | readonly NO_UPSTREAM="(no${JOIN_CHAR}upstream)" |
117 | 117 | readonly NO_LOCAL="(no${JOIN_CHAR}local)" |
118 | 118 | readonly NO_RESULTS_MSG="Everything is synchronized" |
@@ -312,10 +312,11 @@ function printReportLine |
312 | 312 |
|
313 | 313 | function printReport # (header) |
314 | 314 | { |
| 315 | + header=$1 |
315 | 316 | n_notable_differences=${#local_msgs[@]} |
316 | 317 |
|
317 | 318 | # pretty print results |
318 | | - printf "\n $1\n" |
| 319 | + printf "\n $header\n" |
319 | 320 | if [ "$n_notable_differences" != "0" ] |
320 | 321 | then rule_w=$(($local_w+$behind_w+$ahead_w+$remote_w+13)) |
321 | 322 | printHRule $rule_w |
|
0 commit comments