diff options
| author | Matt Hunter <m@lfurio.us> | 2026-03-08 18:52:47 -0400 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-03-30 21:56:09 -0400 |
| commit | 4f88708af94e82e7f8da427d7f3c6a876acbd71a (patch) | |
| tree | 362ad0338b3e544dfcf8c5af4c2dc35b9c695cc1 /prompt | |
| parent | 23b39889be1b58f17c945b54b6d180778a0f86ed (diff) | |
| download | git-sonar-master.tar.gz git-sonar-master.zip | |
If a remote branch is set, but doesn't exist (in the 'missingups'
condition), these functions would output blank ("") causing an error
when used in comparisons in color_local_commits(). It's arguable
whether the POSIX reworks caused this bug or simply revealed it, since
the previous code used bash's [[ ]] test syntax which seemed to tolerate
this case.
Restructure control flow so that any "error" in these functions yields a
result of "0".
The ahead/behind_master functions did not have this problem (the
git-rev-list command failure is already handled), but rewrite them to
match the style of the local functions.
Additionally, the git-rev-list commands are updated to use the more
straight-forward A..B syntax, dropping the use of --left-only or
--right-only. This is more obvious code, and older git clients may
return incorrect results using the previous syntax.
Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
