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

:Git log display is inconsistent with command-line defaults #2281

Open
finite-state-machine opened this issue Mar 24, 2024 · 0 comments
Open

Comments

@finite-state-machine
Copy link

The fugitive version of git log shows entries like this:

commit 3ad7eb55bb1db72125df258d3ee1afd12dca32a6
Merge: 83b3e7d 9ed4719
Author: Finite State Machine (example@example.com)
Date:   Sat Mar 23 16:02:58 2024 -0400

    text: 'unused_char()' bug fix (use w/iterators was unsafe) + tests

Whereas git log usually shows entries like this:

commit 3ad7eb55bb1db72125df258d3ee1afd12dca32a6 (HEAD -> TableGeometry, origin/x32util-main, x32util-main)
Merge: 83b3e7d 9ed4719
Author: Finite State Machine (example@example.com)
Date:   Sat Mar 23 16:02:58 2024 -0400

    text: 'unused_char()' bug fix (use w/iterators was unsafe) + tests

When outputting to a non-TTY, git log matches fugitive's behaviour:

commit 3ad7eb55bb1db72125df258d3ee1afd12dca32a6
Merge: 83b3e7d 9ed4719
Author: Finite State Machine (example@example.com)
Date:   Sat Mar 23 16:02:58 2024 -0400

    text: 'unused_char()' bug fix (use w/iterators was unsafe) + tests

IMO, fugitive should do at least one (ideally, both) of the following:

  • pass --decorate to git log by default
    • ideally, it should respect any explicit log.decorate config setting, but change log.decorate to short if none is specified vs. default auto
  • allow the user to customize the default arguments to git log via a g:fugitive_... global variable.

(This is probably typical of a class of bugs where fugitive's behaviour differs from what users expect due to git's defaults changing between TTY and non-TTY stdout/stderr; in case it's helpful, I've prepared a list of all of the places where git manpages mention "terminal": man-git-mentions-terminal.txt)

Aside, my thanks to @tpope and all contributors for a wonderful tool!

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