mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
1550bb6ed0
Carefully excluding t6300, which sees independent development elsewhere at the time of writing, we use `main` as the default branch name in t6[0-3]*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t6[0-3]*.sh && git checkout HEAD -- t6300\*) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
45 lines
897 B
Bash
Executable file
45 lines
897 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2007 Johannes E. Schindelin
|
|
#
|
|
|
|
test_description='git rev-list involving submodules that this repo has'
|
|
|
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'setup' '
|
|
: > file &&
|
|
git add file &&
|
|
test_tick &&
|
|
git commit -m initial &&
|
|
echo 1 > file &&
|
|
test_tick &&
|
|
git commit -m second file &&
|
|
echo 2 > file &&
|
|
test_tick &&
|
|
git commit -m third file &&
|
|
|
|
rm .git/index &&
|
|
|
|
: > super-file &&
|
|
git add super-file &&
|
|
git submodule add "$(pwd)" sub &&
|
|
git symbolic-ref HEAD refs/heads/super &&
|
|
test_tick &&
|
|
git commit -m super-initial &&
|
|
echo 1 > super-file &&
|
|
test_tick &&
|
|
git commit -m super-first super-file &&
|
|
echo 2 > super-file &&
|
|
test_tick &&
|
|
git commit -m super-second super-file
|
|
'
|
|
|
|
test_expect_success "Ilari's test" '
|
|
git rev-list --objects super main ^super^
|
|
'
|
|
|
|
test_done
|