t/t4*: merge a "grep | sed" pipeline
[git.git] / t / t6008-rev-list-submodule.sh
blob2cdef6fdf985c1ec3836ed1a642da783f902a63e
1 #!/bin/sh
3 # Copyright (c) 2007 Johannes E. Schindelin
6 test_description='git rev-list involving submodules that this repo has'
8 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
11 TEST_PASSES_SANITIZE_LEAK=true
12 . ./test-lib.sh
14 test_expect_success 'setup' '
15 : > file &&
16 git add file &&
17 test_tick &&
18 git commit -m initial &&
19 echo 1 > file &&
20 test_tick &&
21 git commit -m second file &&
22 echo 2 > file &&
23 test_tick &&
24 git commit -m third file &&
26 rm .git/index &&
28 : > super-file &&
29 git add super-file &&
30 git -c protocol.file.allow=always submodule add "$(pwd)" sub &&
31 git symbolic-ref HEAD refs/heads/super &&
32 test_tick &&
33 git commit -m super-initial &&
34 echo 1 > super-file &&
35 test_tick &&
36 git commit -m super-first super-file &&
37 echo 2 > super-file &&
38 test_tick &&
39 git commit -m super-second super-file
42 test_expect_success "Ilari's test" '
43 git rev-list --objects super main ^super^
46 test_done