summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-02-28 07:00:29 -0500
committerMatt Hunter <m@lfurio.us>2026-02-28 07:00:29 -0500
commitb2a09d2a5b73b23a74b24e66b3f37b512b3920f7 (patch)
treead5e6d314d5fe39fcae5f1ba37e56317c9625c87 /README.md
parent254877ef13ba864533b3933fdb5cf0258bee3497 (diff)
downloadgit-sonar-b2a09d2a5b73b23a74b24e66b3f37b512b3920f7.tar.gz
git-sonar-b2a09d2a5b73b23a74b24e66b3f37b512b3920f7.zip
Add new prompt output element "missingups"
A previous behavior of the %{remote} prompt feature was to print something like "git:(upstream⚔branch)" if the branch had never been pushed to the remote. This patch addresses this case to both clean up the prompt appearance and change the semantics of this warning. In my own opinion, it is quite a normal workflow to be spinning off local-only branches, whether they are short lived or not, and giving a noisy warning that "branch" has no remote counterpart is distracting and counter productive. However, a situation that _is worth_ warning the user about is the case when a branch _has been pushed to a remote_ (eg: it has a remote and merge-target configured), but this remote counterpart branch was unexpectedly removed. This is when git-status says "Your branch is based on ..., but the upstream is gone." So, separate this specific warning into a new prompt feature: %{missingups} (missing upstream), which simply shows the lightning bolt character when a configured upstream branch is missing. Remove this case from %{remote}, which is now quiet when the upstream is removed (even if a remote-tracking branch is configured). This separation to a new element makes it possible to still see this warning if opting out of the remote-commits feature. Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions