summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-08-20 16:18:16 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-08-20 16:18:16 -0700
commite28a8670a66125aa29d7a5ea10052c0f6824c2ba (patch)
tree6506300a0123f026feabacf2eae76a665390c8eb /t
parentMerge branch 'bd/diff-strbuf' (diff)
parentUpdate draft release notes for 1.6.0.1 (diff)
downloadtgif-e28a8670a66125aa29d7a5ea10052c0f6824c2ba.tar.xz
Merge branch 'maint'
* maint: Update draft release notes for 1.6.0.1 Add hints to revert documentation about other ways to undo changes Install templates with the user and group of the installing personality "git-merge": allow fast-forwarding in a stat-dirty tree completion: find out supported merge strategies correctly decorate: allow const objects to be decorated for-each-ref: cope with tags with incomplete lines diff --check: do not get confused by new blank lines in the middle remote.c: remove useless if-before-free test mailinfo: avoid violating strbuf assertion git format-patch: avoid underrun when format.headers is empty or all NLs
Diffstat (limited to 't')
-rwxr-xr-xt/t4015-diff-whitespace.sh11
-rwxr-xr-xt/t5100-mailinfo.sh11
-rw-r--r--t/t5100/info-from.expect5
-rw-r--r--t/t5100/info-from.in8
-rwxr-xr-xt/t6300-for-each-ref.sh10
-rwxr-xr-xt/t7600-merge.sh10
6 files changed, 55 insertions, 0 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index a27fccc8dc..ec98509fd2 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -341,4 +341,15 @@ test_expect_success 'checkdiff detects trailing blank lines' '
git diff --check | grep "ends with blank"
'
+test_expect_success 'checkdiff allows new blank lines' '
+ git checkout x &&
+ mv x y &&
+ (
+ echo "/* This is new */" &&
+ echo "" &&
+ cat y
+ ) >x &&
+ git diff --check
+'
+
test_done
diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh
index 8dfaddda91..198e3503d5 100755
--- a/t/t5100-mailinfo.sh
+++ b/t/t5100-mailinfo.sh
@@ -43,4 +43,15 @@ test_expect_success 'Preserve NULs out of MIME encoded message' '
'
+test_expect_success 'mailinfo on from header without name works' '
+
+ mkdir info-from &&
+ git mailsplit -oinfo-from "$TEST_DIRECTORY"/t5100/info-from.in &&
+ test_cmp "$TEST_DIRECTORY"/t5100/info-from.in info-from/0001 &&
+ git mailinfo info-from/msg info-from/patch \
+ <info-from/0001 >info-from/out &&
+ test_cmp "$TEST_DIRECTORY"/t5100/info-from.expect info-from/out
+
+'
+
test_done
diff --git a/t/t5100/info-from.expect b/t/t5100/info-from.expect
new file mode 100644
index 0000000000..c31d2eb550
--- /dev/null
+++ b/t/t5100/info-from.expect
@@ -0,0 +1,5 @@
+Author: bare@example.com
+Email: bare@example.com
+Subject: testing bare address in from header
+Date: Sun, 25 May 2008 00:38:18 -0700
+
diff --git a/t/t5100/info-from.in b/t/t5100/info-from.in
new file mode 100644
index 0000000000..4f082093fc
--- /dev/null
+++ b/t/t5100/info-from.in
@@ -0,0 +1,8 @@
+From 667d8940e719cddee1cfe237cbbe215e20270b09 Mon Sep 17 00:00:00 2001
+From: bare@example.com
+Date: Sun, 25 May 2008 00:38:18 -0700
+Subject: [PATCH] testing bare address in from header
+
+commit message
+---
+patch
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index a3c8941c72..8ced59321e 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -262,4 +262,14 @@ for i in "--perl --shell" "-s --python" "--python --tcl" "--tcl --perl"; do
"
done
+test_expect_success 'an unusual tag with an incomplete line' '
+
+ git tag -m "bogo" bogo &&
+ bogo=$(git cat-file tag bogo) &&
+ bogo=$(printf "%s" "$bogo" | git mktag) &&
+ git tag -f bogo "$bogo" &&
+ git for-each-ref --format "%(body)" refs/tags/bogo
+
+'
+
test_done
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 5eeb6c2b27..fee8fb77d4 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -488,4 +488,14 @@ test_expect_success 'merge c1 with c1 and c2' '
test_debug 'gitk --all'
+test_expect_success 'merge fast-forward in a dirty tree' '
+ git reset --hard c0 &&
+ mv file file1 &&
+ cat file1 >file &&
+ rm -f file1 &&
+ git merge c2
+'
+
+test_debug 'gitk --all'
+
test_done