Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce spacing in gps ls #259

Open
Alizter opened this issue Oct 20, 2023 · 0 comments
Open

Reduce spacing in gps ls #259

Alizter opened this issue Oct 20, 2023 · 0 comments

Comments

@Alizter
Copy link
Contributor

Alizter commented Oct 20, 2023

The current output of gps ls has a lot of spacing between the commit messages and the branch names when they are much shorter than 50 chars. We should improve this situation by doing the following:

  1. Setup end-to-end tests for gps ls. A sketch can be found in exploration: replace gpgme with rpgp #240.
  2. Tweak the output of gps ls so that the max of the commit messages is used to calculate the spacing.
  3. Do some more minor tweaks on how we display the branch names.

Currently the output looks like:

main tracking origin/main [ahead 4]
0    a9ed275 nix: add flake                                     ( lr  )
1    cf91753 chore: add macos and windows runners               ()
2    f543b6c exploration: replace gpgme with rpgp               ()
3    de36d0a add expect tests                                   ()

After the above suggestions it could look like:

main tracking origin/main [ahead 4]
0    a9ed275 nix: add flake                       (lr)
1    cf91753 chore: add macos and windows runners ()
2    f543b6c exploration: replace gpgme with rpgp ()
3    de36d0a add expect tests                     ()

A further tweak to replace () with [] gives:

main tracking origin/main [ahead 4]
0    a9ed275 nix: add flake                       [lr]
1    cf91753 chore: add macos and windows runners []
2    f543b6c exploration: replace gpgme with rpgp []
3    de36d0a add expect tests                     []

When a patch has multiple branches we currently print:

0    a5139ee nix: add flake                                     ( foo l ps/rr/nix__add_flake lr  )

this could be improved to:

0    a5139ee nix: add flake  [foo l, ps/rr/nix__add_flake lr]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant