Closed hqkhan closed 1 year ago
@arl
I've let 2 style comments, and do you think you can add you a test case in formatter_test.go in which divergences strings are swapped, please?
Thanks for the review! Yes, I will add a test and also update README to make the option more visible.
@arl
I've let 2 style comments, and do you think you can add you a test case in formatter_test.go in which divergences strings are swapped, please?
Thanks for the review! Yes, I will add a test and also update README to make the option more visible.
Of course! Yes good catch about the readme, that'd be nice.
LGTM thanks for the extensive testing 👍 But i forgot to ask you, sorry my bad, can you add
swap_divergence: false
with a doc string to the default config in gitmux.yml (at project root).
Absolutely, will do
@hqkhan I'll cut a release with this and #97 resolution (when I'll have done it).
Purpose
Adding
swap_divergence
option to allow users to customize whether "upstream behind count" should be displayed first or "upstream ahead count".Main motivation behind this was that I use
gitmux
in conjunction withlazygit
. Lazygit's branch menu always showsahead
count first followed bybehind
count. I thought it'd be nice to be able to sync them up.swap_divergence: false
:swap_divergence: true
:Approach
Added
swap_divergence
boolean flag for yaml file. Instead of appending to the returned strings
right away, savingahead
andbehind
strings in separate vars then appending to original strings
based onswap_divergence
flag.Thank you!