mirror of
https://github.com/git/git.git
synced 2026-04-01 20:40:08 +02:00
Merge branch 'master' of git://repo.or.cz/alt-git
This commit is contained in:
@@ -15,14 +15,17 @@ create_file() {
|
||||
test_expect_success 'setup' '
|
||||
create_file file1 "File1 contents" &&
|
||||
create_file file2 "File2 contents" &&
|
||||
git add file1 file2 &&
|
||||
create_file file3 "File3 contents" &&
|
||||
git add file1 file2 file3 &&
|
||||
git commit -m 1
|
||||
'
|
||||
|
||||
test_expect_success 'criss-cross rename' '
|
||||
mv file1 tmp &&
|
||||
mv file2 file1 &&
|
||||
mv tmp file2
|
||||
mv tmp file2 &&
|
||||
cp file1 file1-swapped &&
|
||||
cp file2 file2-swapped
|
||||
'
|
||||
|
||||
test_expect_success 'diff -M -B' '
|
||||
@@ -32,7 +35,32 @@ test_expect_success 'diff -M -B' '
|
||||
'
|
||||
|
||||
test_expect_success 'apply' '
|
||||
git apply diff
|
||||
git apply diff &&
|
||||
test_cmp file1 file1-swapped &&
|
||||
test_cmp file2 file2-swapped
|
||||
'
|
||||
|
||||
test_expect_success 'criss-cross rename' '
|
||||
git reset --hard &&
|
||||
mv file1 tmp &&
|
||||
mv file2 file1 &&
|
||||
mv file3 file2
|
||||
mv tmp file3 &&
|
||||
cp file1 file1-swapped &&
|
||||
cp file2 file2-swapped &&
|
||||
cp file3 file3-swapped
|
||||
'
|
||||
|
||||
test_expect_success 'diff -M -B' '
|
||||
git diff -M -B > diff &&
|
||||
git reset --hard
|
||||
'
|
||||
|
||||
test_expect_success 'apply' '
|
||||
git apply diff &&
|
||||
test_cmp file1 file1-swapped &&
|
||||
test_cmp file2 file2-swapped &&
|
||||
test_cmp file3 file3-swapped
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
@@ -284,10 +284,36 @@ test_expect_success 'set up more tangled history' '
|
||||
git merge master~3 &&
|
||||
git merge side~1 &&
|
||||
git checkout master &&
|
||||
git merge tangle
|
||||
git merge tangle &&
|
||||
git checkout -b reach &&
|
||||
test_commit reach &&
|
||||
git checkout master &&
|
||||
git checkout -b octopus-a &&
|
||||
test_commit octopus-a &&
|
||||
git checkout master &&
|
||||
git checkout -b octopus-b &&
|
||||
test_commit octopus-b &&
|
||||
git checkout master &&
|
||||
test_commit seventh &&
|
||||
git merge octopus-a octopus-b
|
||||
git merge reach
|
||||
'
|
||||
|
||||
cat > expect <<\EOF
|
||||
* Merge branch 'reach'
|
||||
|\
|
||||
| \
|
||||
| \
|
||||
*-. \ Merge branches 'octopus-a' and 'octopus-b'
|
||||
|\ \ \
|
||||
* | | | seventh
|
||||
| | * | octopus-b
|
||||
| |/ /
|
||||
|/| |
|
||||
| * | octopus-a
|
||||
|/ /
|
||||
| * reach
|
||||
|/
|
||||
* Merge branch 'tangle'
|
||||
|\
|
||||
| * Merge branch 'side' (early part) into tangle
|
||||
@@ -316,7 +342,7 @@ cat > expect <<\EOF
|
||||
* initial
|
||||
EOF
|
||||
|
||||
test_expect_success 'log --graph with merge' '
|
||||
test_expect_sucess 'log --graph with merge' '
|
||||
git log --graph --date-order --pretty=tformat:%s |
|
||||
sed "s/ *$//" >actual &&
|
||||
test_cmp expect actual
|
||||
|
||||
@@ -132,4 +132,14 @@ test_expect_success 'clone empty repository' '
|
||||
test $actual = $expected)
|
||||
'
|
||||
|
||||
test_expect_success 'clone empty repository, and then push should not segfault.' '
|
||||
cd "$D" &&
|
||||
rm -fr empty/ empty-clone/ &&
|
||||
mkdir empty &&
|
||||
(cd empty && git init) &&
|
||||
git clone empty empty-clone &&
|
||||
cd empty-clone &&
|
||||
test_must_fail git push
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
@@ -64,6 +64,16 @@ test_expect_success 'submodule add' '
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add --branch' '
|
||||
(
|
||||
cd addtest &&
|
||||
git submodule add -b initial "$submodurl" submod-branch &&
|
||||
git submodule init &&
|
||||
cd submod-branch &&
|
||||
git branch | grep initial
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add with ./ in path' '
|
||||
(
|
||||
cd addtest &&
|
||||
|
||||
@@ -69,7 +69,7 @@ test_expect_success 'packed obs in alt ODB are repacked even when local repo is
|
||||
done
|
||||
'
|
||||
|
||||
test_expect_failure 'packed obs in alt ODB are repacked when local repo has packs' '
|
||||
test_expect_success 'packed obs in alt ODB are repacked when local repo has packs' '
|
||||
rm -f .git/objects/pack/* &&
|
||||
echo new_content >> file1 &&
|
||||
git add file1 &&
|
||||
|
||||
@@ -10,6 +10,11 @@ Testing basic diff tool invocation
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
if ! test_have_prereq PERL; then
|
||||
say 'skipping difftool tests, perl not available'
|
||||
test_done
|
||||
fi
|
||||
|
||||
remove_config_vars()
|
||||
{
|
||||
# Unset all config variables used by git-difftool
|
||||
|
||||
@@ -616,7 +616,7 @@ test_expect_success 'in-reply-to but no threading' '
|
||||
--from="Example <nobody@example.com>" \
|
||||
--to=nobody@example.com \
|
||||
--in-reply-to="<in-reply-id@example.com>" \
|
||||
--no-thread \
|
||||
--nothread \
|
||||
$patches |
|
||||
grep "In-Reply-To: <in-reply-id@example.com>"
|
||||
'
|
||||
|
||||
@@ -491,7 +491,7 @@ test_create_repo () {
|
||||
repo="$1"
|
||||
mkdir -p "$repo"
|
||||
cd "$repo" || error "Cannot setup test environment"
|
||||
"$GIT_EXEC_PATH/git-init" "--template=$owd/../templates/blt/" >&3 2>&4 ||
|
||||
"$GIT_EXEC_PATH/git-init" "--template=$TEST_DIRECTORY/../templates/blt/" >&3 2>&4 ||
|
||||
error "cannot run git init -- have you built things yet?"
|
||||
mv .git/hooks .git/hooks-disabled
|
||||
cd "$owd"
|
||||
|
||||
Reference in New Issue
Block a user