diff options
author | Justin Donnelly <justinrdonnelly@gmail.com> | 2022-02-27 19:57:10 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-23 13:07:40 -0700 |
commit | 0ec7c23cdc6bde5af3039c59e21507adf7579a99 (patch) | |
tree | 8e84398b0655b1cac82bf6a951c825fabd373d6a /contrib/scalar/scalar.c | |
parent | git-prompt: rename `upstream` to `upstream_type` (diff) | |
download | tgif-0ec7c23cdc6bde5af3039c59e21507adf7579a99.tar.xz |
git-prompt: make upstream state indicator location consistent
Make upstream state indicator location more consistent with similar
state indicators (e.g. sparse). Group the short upstream state indicator
(`=`, `<`, `>`, or `<>`) with other short state indicators immediately
after the branch name. Previously short and long upstream state
indicators appeared after all other state indicators.
Use a separator (`SP` or `GIT_PS1_STATESEPARATOR`) between branch name
and short upstream state indicator. Previously the short upstream state
indicator would sometimes appear directly adjacent to the branch name
instead of being separated.
For comparison, `__git_ps1` examples without upstream state indicator:
(main)
(main %)
(main *%)
(main|SPARSE)
(main %|SPARSE)
(main *%|SPARSE)
(main|SPARSE|REBASE 1/2)
(main %|SPARSE|REBASE 1/2)
Note that if there are short state indicators, they appear together
after the branch name and separated from it by `SP` or
`GIT_PS1_STATESEPARATOR`.
Before/after examples with short upstream state indicator:
| Before | After |
| ---------------- | ---------------- |
| (main=) | (main =) |
| (main|SPARSE=) | (main =|SPARSE) |
| (main %|SPARSE=) | (main %=|SPARSE) |
Signed-off-by: Justin Donnelly <justinrdonnelly@gmail.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/scalar/scalar.c')
0 files changed, 0 insertions, 0 deletions