tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
20.01k stars 1.01k forks source link

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

Open finite-state-machine opened 7 months ago

finite-state-machine commented 7 months ago

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:

(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!