Option to modify revision mark for root commits
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 22 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | revision: Denote root commits with '#'revision.c | +4 | 17 replies | |
| 2/2 | revision: implement --show-linear-break for --graphDocumentation/ log-tree.c revision.c +1 more | +13 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Option to modify revision mark for root commits
This patch series allows --show-linear-break to be used with --graph, allowing for the revision mark to be changed for root commits.
Feel free to squash away PATCH 1, or maybe even discard PATCH 2.
Jason: tested against Cygwin x86_64/release/git/git-2.30.0-1-src.tar.xz
Note: PATCH 2 revision.c:2410 makes a second copy of optarg. This may not be necessary.
Background:
The use case is --graph --oneline with unrelated histories. For example, in a hypothetical repository with an orphaned "prebuilt" branch containing builds of the master branch, the history may look like:
kmarek@kyle-ppc64le /tmp/somerepo
$ git log --graph --all --oneline * 02190b6 (prebuilt) add aarch64 * 7b873f6 add x86_64 * 26cc783 add ppc64le * 5b7186e (HEAD -> master) add Makefile * ea69093 implement cmdline parsing * a65df8a add main.c * 7727eb3 Initial commit
At first sight, the above log implies that 26cc783's parent is 5b7186e, or that master is an ancestor to prebuilt, but 26cc783 is the start of a new history:
kmarek@kyle-ppc64le /tmp/somerepo
$ git log --graph --oneline master * 5b7186e (HEAD -> master) add Makefile * ea69093 implement cmdline parsing * a65df8a add main.c * 7727eb3 Initial commit
kmarek@kyle-ppc64le /tmp/somerepo
$ git log --graph --oneline prebuilt * 02190b6 (prebuilt) add aarch64 * 7b873f6 add x86_64 * 26cc783 add ppc64le
To identify the start of a new history:
kmarek@kyle-ppc64le /tmp/somerepo
$ git log --graph --all --oneline --show-linear-break * 02190b6 (prebuilt) add aarch64 * 7b873f6 add x86_64 # 26cc783 add ppc64le * 5b7186e (HEAD -> master) add Makefile * ea69093 implement cmdline parsing * a65df8a add main.c # 7727eb3 Initial commit
kmarek@kyle-ppc64le /tmp/somerepo
$ git log --graph --all --oneline --show-linear-break=I * 02190b6 (prebuilt) add aarch64 * 7b873f6 add x86_64 I 26cc783 add ppc64le * 5b7186e (HEAD -> master) add Makefile * ea69093 implement cmdline parsing * a65df8a add main.c I 7727eb3 Initial commit
Kyle Marek (2):
revision: Denote root commits with '#'
revision: implement --show-linear-break for --graph
Documentation/rev-list-options.txt | 7 +++++++ log-tree.c | 2 +- revision.c | 10 ++++++---- revision.h | 1 + 4 files changed, 15 insertions(+), 5 deletions(-)
Signature · 1 line
2.29.2