I want to see how the given commit relates to the history of changes to a file.
Attempt 1:
gitk --select-commit=4ca5063196489705643b4b308ad9065d80be50e1 -- Makefile
The specified commit is not selected and not included at all.
Attempt 2:
git log --no-walk --oneline $(git rev-list HEAD -- Makefile; echo 4ca5063196489705643b4b308ad9065d80be50e1)
bf51adc Improve workarounds for building in various environments
9ddeb4d Improve "deb_heavy" target of Makefile
2b8104e Hacks for building on Debian Squeeze
22a9a34 Trailing newline in Makefile
4ca5063 man: Fix container example a bit
cd1a5d0 Debianization...
0149027 Start writing dived(1) man page
985cbac Improve generated Debian package
6875546 Manpage for dive
77c1706 tests: Add tests for non-priv functions
9dfcd8e Remove hacky __MUSL__, use NO_WHATEVER instead
838655e Support compilation with musl-gcc
5d10719 Options to manage capabilities bounding set
a714834 Debian package creation script
a04c85e Implementation of first version of dive
b1ce903 initial example
Better. The commit is included. But I want it to stand out. And I also want a tree.
Attempt 3:
$ git log --graph --no-walk --oneline $(git rev-list HEAD -- Makefile; echo 4ca5063196489705643b4b308ad9065d80be50e1)
* bf51adc Improve workarounds for building in various environments
| * 9ddeb4d Improve "deb_heavy" target of Makefile
| | * 2b8104e Hacks for building on Debian Squeeze
| | * 22a9a34 Trailing newline in Makefile
| | * 4ca5063 man: Fix container example a bit
| | * cd1a5d0 Debianization...
| | | * 0149027 Start writing dived(1) man page
| | | * 985cbac Improve generated Debian package
| | | * 6875546 Manpage for dive
| | | | * 77c1706 tests: Add tests for non-priv functions
| | | | | * 9dfcd8e Remove hacky __MUSL__, use NO_WHATEVER instead
| | | | | | * 838655e Support compilation with musl-gcc
| | | | | | | * 5d10719 Options to manage capabilities bounding set
| | | | | | | | * a714834 Debian package creation script
| | | | | | | | | * a04c85e Implementation of first version of dive
| | | | | | | | | * b1ce903 initial example
Not the correct tree. --no-walk
and --graph
does not play together well.
Attempt 4:
gitk --no-walk --select-commit=4ca5063196489705643b4b308ad9065d80be50e1 $(git rev-list HEAD -- Makefile; echo 4ca5063196489705643b4b308ad9065d80be50e1)
The commit gets selected. But it does not filter by path now. Basically gitk
seems to ignore --no-walk
.
How do I do it properly?