diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-02-18 01:25:05 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-18 01:25:05 +0100 |
commit | 708cbef33a2c905c920e94b70d0946f9f4ff3a4e (patch) | |
tree | 97c45e78e356cdfc71deb5f57499d3e2f5e8ae45 /t/t6012-rev-list-simplify.sh | |
parent | Merge branch 'jz/patch-id-hunk-header-parsing-fix' (diff) | |
parent | git-rev-list: add --exclude-first-parent-only flag (diff) | |
download | git-708cbef33a2c905c920e94b70d0946f9f4ff3a4e.tar.xz git-708cbef33a2c905c920e94b70d0946f9f4ff3a4e.zip |
Merge branch 'jz/rev-list-exclude-first-parent-only'
"git log" and friends learned an option --exclude-first-parent-only
to propagate UNINTERESTING bit down only along the first-parent
chain, just like --first-parent option shows commits that lack the
UNINTERESTING bit only along the first-parent chain.
* jz/rev-list-exclude-first-parent-only:
git-rev-list: add --exclude-first-parent-only flag
Diffstat (limited to 't/t6012-rev-list-simplify.sh')
-rwxr-xr-x | t/t6012-rev-list-simplify.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh index 4fedc614fa..63fcccec32 100755 --- a/t/t6012-rev-list-simplify.sh +++ b/t/t6012-rev-list-simplify.sh @@ -16,13 +16,12 @@ unnote () { } # -# Create a test repo with interesting commit graph: +# Create a test repo with an interesting commit graph: # -# A--B----------G--H--I--K--L -# \ \ / / -# \ \ / / -# C------E---F J -# \_/ +# A-----B-----G--H--I--K--L +# \ \ / / +# \ \ / / +# C--D--E--F J # # The commits are laid out from left-to-right starting with # the root commit A and terminating at the tip commit L. @@ -142,6 +141,13 @@ check_result 'I B A' --author-date-order -- file check_result 'H' --first-parent -- another-file check_result 'H' --first-parent --topo-order -- another-file +check_result 'L K I H G B A' --first-parent L +check_result 'F E D C' --exclude-first-parent-only F ^L +check_result '' F ^L +check_result 'L K I H G J' L ^F +check_result 'L K I H G B J' --exclude-first-parent-only L ^F +check_result 'L K I H G B' --exclude-first-parent-only --first-parent L ^F + check_result 'E C B A' --full-history E -- lost test_expect_success 'full history simplification without parent' ' printf "%s\n" E C B A >expect && |