Linus Torvalds | 4d1012c | 2007-11-11 23:35:23 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Copyright (c) 2007 Johannes E. Schindelin |
| 4 | # |
| 5 | |
| 6 | test_description='git rev-list involving submodules that this repo has' |
| 7 | |
Johannes Schindelin | 1550bb6 | 2020-11-18 23:44:36 +0000 | [diff] [blame] | 8 | GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
Johannes Schindelin | 334afbc | 2020-11-18 23:44:19 +0000 | [diff] [blame] | 9 | export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
| 10 | |
Linus Torvalds | 4d1012c | 2007-11-11 23:35:23 +0000 | [diff] [blame] | 11 | . ./test-lib.sh |
| 12 | |
| 13 | test_expect_success 'setup' ' |
| 14 | : > file && |
| 15 | git add file && |
| 16 | test_tick && |
| 17 | git commit -m initial && |
| 18 | echo 1 > file && |
| 19 | test_tick && |
| 20 | git commit -m second file && |
| 21 | echo 2 > file && |
| 22 | test_tick && |
| 23 | git commit -m third file && |
| 24 | |
| 25 | rm .git/index && |
| 26 | |
| 27 | : > super-file && |
| 28 | git add super-file && |
Mark Levedahl | ec05df3 | 2008-07-09 21:05:40 -0400 | [diff] [blame] | 29 | git submodule add "$(pwd)" sub && |
Linus Torvalds | 4d1012c | 2007-11-11 23:35:23 +0000 | [diff] [blame] | 30 | git symbolic-ref HEAD refs/heads/super && |
| 31 | test_tick && |
| 32 | git commit -m super-initial && |
| 33 | echo 1 > super-file && |
| 34 | test_tick && |
| 35 | git commit -m super-first super-file && |
| 36 | echo 2 > super-file && |
| 37 | test_tick && |
| 38 | git commit -m super-second super-file |
| 39 | ' |
| 40 | |
| 41 | test_expect_success "Ilari's test" ' |
Johannes Schindelin | 1550bb6 | 2020-11-18 23:44:36 +0000 | [diff] [blame] | 42 | git rev-list --objects super main ^super^ |
Linus Torvalds | 4d1012c | 2007-11-11 23:35:23 +0000 | [diff] [blame] | 43 | ' |
| 44 | |
| 45 | test_done |