aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-10 14:17:49 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-10 14:17:49 -0700
commit44e1d764d0d3123a614377e10655b4348cf57771 (patch)
tree70154ab1c6ce2a4e8756770132de1b05552252c8 /t
parent102cb08521df5f33b30c0ef41a1078a61e593943 (diff)
parent0eaf22f4c4bba89457e733264e71343368712793 (diff)
downloadgit-44e1d764d0d3123a614377e10655b4348cf57771.tar.gz
git-44e1d764d0d3123a614377e10655b4348cf57771.tar.xz
Merge branch 'master' into mk/rename
* master: git-verify-pack: no need to count errors git-verify-pack: buffer overrun paranoia git-verify-pack: free pack after use and a cleanup git-verify-pack: get rid of while loop git-verify-pack: insist on .idx extension git-verify-pack: more careful path handling git-verify-pack: show usage when no pack was specified Add has_extension() builtin-apply: remove unused increment Fix git-diff A...B combine-diff: use color git-apply: applying a patch to make a symlink shorter. allow diff.renamelimit to be set regardless of -M/-C make --find-copies-harder imply -C find_unique_abbrev() with len=0 should not abbreviate check return value from diff_setup_done() Fix tutorial-2.html Documentation: git-status takes the same options as git-commit Update git-init-db(1) and documentation of core.sharedRepository
Diffstat (limited to 't')
-rwxr-xr-xt/t4115-apply-symlink.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh
new file mode 100755
index 000000000..d5f2cfb18
--- /dev/null
+++ b/t/t4115-apply-symlink.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Junio C Hamano
+#
+
+test_description='git-apply symlinks and partial files
+
+'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ ln -s path1/path2/path3/path4/path5 link1 &&
+ git add link? &&
+ git commit -m initial &&
+
+ git branch side &&
+
+ rm -f link? &&
+
+ ln -s htap6 link1 &&
+ git update-index link? &&
+ git commit -m second &&
+
+ git diff-tree -p HEAD^ HEAD >patch &&
+ git apply --stat --summary patch
+
+'
+
+test_expect_success 'apply symlink patch' '
+
+ git checkout side &&
+ git apply patch &&
+ git diff-files -p >patched &&
+ diff -u patch patched
+
+'
+
+test_expect_success 'apply --index symlink patch' '
+
+ git checkout -f side &&
+ git apply --index patch &&
+ git diff-index --cached -p HEAD >patched &&
+ diff -u patch patched
+
+'
+
+test_done