]> git.ipfire.org Git - thirdparty/git.git/blame - t/t6008-rev-list-submodule.sh
The third batch
[thirdparty/git.git] / t / t6008-rev-list-submodule.sh
CommitLineData
4d1012c3
LT
1#!/bin/sh
2#
3# Copyright (c) 2007 Johannes E. Schindelin
4#
5
6test_description='git rev-list involving submodules that this repo has'
7
1550bb6e 8GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
334afbc7
JS
9export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10
e77b3da6 11TEST_PASSES_SANITIZE_LEAK=true
4d1012c3
LT
12. ./test-lib.sh
13
14test_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 &&
25
26 rm .git/index &&
27
28 : > super-file &&
29 git add super-file &&
0f21b8f4 30 git -c protocol.file.allow=always submodule add "$(pwd)" sub &&
4d1012c3
LT
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
40'
41
42test_expect_success "Ilari's test" '
1550bb6e 43 git rev-list --objects super main ^super^
4d1012c3
LT
44'
45
46test_done