summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t1415-worktree-refs.sh18
-rwxr-xr-xt/t3436-rebase-more-options.sh4
-rwxr-xr-xt/t5302-pack-index.sh7
-rwxr-xr-xt/t5534-push-signed.sh7
-rwxr-xr-xt/t6012-rev-list-simplify.sh8
-rwxr-xr-xt/t6400-merge-df.sh8
-rwxr-xr-xt/t6409-merge-subtree.sh12
-rwxr-xr-xt/t6430-merge-recursive.sh4
8 files changed, 37 insertions, 31 deletions
diff --git a/t/t1415-worktree-refs.sh b/t/t1415-worktree-refs.sh
index bb2c7572a3..7ab91241ab 100755
--- a/t/t1415-worktree-refs.sh
+++ b/t/t1415-worktree-refs.sh
@@ -76,24 +76,24 @@ test_expect_success 'reflog of worktrees/xx/HEAD' '
test_cmp expected actual.wt2
'
-test_expect_success 'for-each-ref from main repo' '
+test_expect_success 'for-each-ref from main worktree' '
mkdir fer1 &&
git -C fer1 init repo &&
test_commit -C fer1/repo initial &&
git -C fer1/repo worktree add ../second &&
- git -C fer1/repo update-ref refs/bisect/main HEAD &&
- git -C fer1/repo update-ref refs/rewritten/main HEAD &&
- git -C fer1/repo update-ref refs/worktree/main HEAD &&
- git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&
+ git -C fer1/repo update-ref refs/bisect/first HEAD &&
+ git -C fer1/repo update-ref refs/rewritten/first HEAD &&
+ git -C fer1/repo update-ref refs/worktree/first HEAD &&
+ git -C fer1/repo for-each-ref --format="%(refname)" | grep first >actual &&
cat >expected <<-\EOF &&
- refs/bisect/main
- refs/rewritten/main
- refs/worktree/main
+ refs/bisect/first
+ refs/rewritten/first
+ refs/worktree/first
EOF
test_cmp expected actual
'
-test_expect_success 'for-each-ref from linked repo' '
+test_expect_success 'for-each-ref from linked worktree' '
mkdir fer2 &&
git -C fer2 init repo &&
test_commit -C fer2/repo initial &&
diff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh
index 996e82787e..eaaf4c8d1d 100755
--- a/t/t3436-rebase-more-options.sh
+++ b/t/t3436-rebase-more-options.sh
@@ -65,8 +65,8 @@ test_expect_success '--ignore-whitespace is remembered when continuing' '
'
test_ctime_is_atime () {
- git log $1 --format=%ai >authortime &&
- git log $1 --format=%ci >committertime &&
+ git log $1 --format="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> %ai" >authortime &&
+ git log $1 --format="%cn <%ce> %ci" >committertime &&
test_cmp authortime committertime
}
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index c92e553a2f..7c9d687367 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -277,4 +277,11 @@ test_expect_success 'index-pack --fsck-objects also warns upon missing tagger in
grep "^warning:.* expected .tagger. line" err
'
+test_expect_success 'index-pack -v --stdin produces progress for both phases' '
+ pack=$(git pack-objects --all pack </dev/null) &&
+ GIT_PROGRESS_DELAY=0 git index-pack -v --stdin <pack-$pack.pack 2>err &&
+ test_i18ngrep "Receiving objects" err &&
+ test_i18ngrep "Resolving deltas" err
+'
+
test_done
diff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh
index 7e928aff66..af0385fb89 100755
--- a/t/t5534-push-signed.sh
+++ b/t/t5534-push-signed.sh
@@ -282,10 +282,9 @@ test_expect_success GPG 'failed atomic push does not execute GPG' '
EOF
test_must_fail env PATH="$TRASH_DIRECTORY:$PATH" git push \
--signed --atomic --porcelain \
- dst noop ff noff >out 2>&1 &&
+ dst noop ff noff >out 2>err &&
- test_i18ngrep ! "gpg failed to sign" out &&
- sed -n -e "/^To dst/,$ p" out >actual &&
+ test_i18ngrep ! "gpg failed to sign" err &&
cat >expect <<-EOF &&
To dst
= refs/heads/noop:refs/heads/noop [up to date]
@@ -293,7 +292,7 @@ test_expect_success GPG 'failed atomic push does not execute GPG' '
! refs/heads/noff:refs/heads/noff [rejected] (non-fast-forward)
Done
EOF
- test_i18ncmp expect actual
+ test_cmp expect out
'
test_done
diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh
index b6fa43ace0..7fc10f8593 100755
--- a/t/t6012-rev-list-simplify.sh
+++ b/t/t6012-rev-list-simplify.sh
@@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' '
test_expect_success 'rebuild repo' '
rm -rf .git * &&
git init &&
- git switch -c main &&
+ git switch -c topic &&
echo base >file &&
git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' '
git add file &&
test_commit B &&
- git switch main &&
+ git switch topic &&
test_must_fail git merge -m "M" B &&
echo A >file &&
echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' '
git merge -m R -Xtheirs X &&
note R &&
- git switch main &&
+ git switch topic &&
git merge -m N R &&
note N &&
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' '
git add z &&
test_commit Z &&
- git switch main &&
+ git switch topic &&
git merge -m O Z &&
note O &&
diff --git a/t/t6400-merge-df.sh b/t/t6400-merge-df.sh
index 400a4cd139..f1b84617af 100755
--- a/t/t6400-merge-df.sh
+++ b/t/t6400-merge-df.sh
@@ -124,7 +124,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
git add . &&
git commit -m initial &&
- git branch main &&
+ git branch topic &&
git branch other &&
git checkout other &&
@@ -132,10 +132,10 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
git add -u &&
git commit -m other &&
- git checkout main &&
- echo main >foo/bar/baz &&
+ git checkout topic &&
+ echo topic >foo/bar/baz &&
git add -u &&
- git commit -m main &&
+ git commit -m topic &&
git merge other &&
git ls-files -s >out &&
diff --git a/t/t6409-merge-subtree.sh b/t/t6409-merge-subtree.sh
index 1a0d0e23d0..b8e8b6f642 100755
--- a/t/t6409-merge-subtree.sh
+++ b/t/t6409-merge-subtree.sh
@@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' '
test_commit foo
'
-test_expect_success 'setup branch main' '
- git checkout -b main master &&
+test_expect_success 'setup topic branch' '
+ git checkout -b topic master &&
git merge -s ours --no-commit --allow-unrelated-histories sub &&
git read-tree --prefix=dir/ -u sub &&
- git commit -m "initial merge of sub into main" &&
+ git commit -m "initial merge of sub into topic" &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
'
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' '
test_commit bar
'
-test_expect_success 'update branch main' '
- git checkout main &&
- git merge -s subtree sub -m "second merge of sub into main" &&
+test_expect_success 'update topic branch' '
+ git checkout topic &&
+ git merge -s subtree sub -m "second merge of sub into topic" &&
test_path_is_file dir/bar.t &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
diff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh
index d48d211a95..a328260d42 100755
--- a/t/t6430-merge-recursive.sh
+++ b/t/t6430-merge-recursive.sh
@@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
test_expect_success 'merging with triple rename across D/F conflict' '
git reset --hard HEAD &&
- git checkout -b main &&
+ git checkout -b topic &&
git rm -rf . &&
echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' '
test_tick &&
git commit -a -m changesimplefile &&
- git checkout main &&
+ git checkout topic &&
git rm sub1 &&
git mv sub2 sub1 &&
test_tick &&