diff options
| author | Matt Hunter <m@lfurio.us> | 2026-06-01 03:30:15 -0400 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-06-01 03:30:15 -0400 |
| commit | 07d6f75fa751361f6fd9d5f35155fb2885402a87 (patch) | |
| tree | 0cfc7808226e7345489619a657e5ffbc8b404364 /git-sonar.1 | |
| parent | 45f88d69871e1a9385f11c4162ea6cd84f04c6c0 (diff) | |
| download | git-sonar-07d6f75fa751361f6fd9d5f35155fb2885402a87.tar.gz git-sonar-07d6f75fa751361f6fd9d5f35155fb2885402a87.zip | |
Fix %{alert} not rendering when upstream is missing
Though the command used to initialize $upstream_name will return a
failed exit code when where is not a upstream branch available, that
command will still echo its argument to stdout, which ends up in our
variable. This ends up not breaking most usage of the value, as it
doesn't contain a real ref - but the [ -z "$upstream_name" ] check in
element_alert would essentially never evaluate true.
Handle failed cases by initializing $upstream_name with an empty string.
Fixes: cee3f0443ff9 ("Bulk rewrite of git-sonar script")
Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to 'git-sonar.1')
0 files changed, 0 insertions, 0 deletions
