summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-27 00:56:05 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-27 00:56:05 -0800
commit41d5b7e362c33dc54cbc814e50403a2084204f9f (patch)
tree2885eb362c2497c39f8bf11147ee59e95b72c8ab /t
parente7821d73bd0256bfc15c48945beded063e17c1b6 (diff)
parentec7fc0b1a46c5a352532ea3f29c5663752fd8ac6 (diff)
downloadgit-41d5b7e362c33dc54cbc814e50403a2084204f9f.tar.gz
Merge branch 'maint'
* maint: builtin-apply.c: pay attention to -p<n> when determining the name
Diffstat (limited to 't')
-rwxr-xr-xt/t4128-apply-root.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t4128-apply-root.sh b/t/t4128-apply-root.sh
index 8f6aea48d8..6cc741a634 100755
--- a/t/t4128-apply-root.sh
+++ b/t/t4128-apply-root.sh
@@ -58,6 +58,23 @@ test_expect_success 'apply --directory (new file)' '
'
cat > patch << EOF
+diff --git a/c/newfile2 b/c/newfile2
+new file mode 100644
+index 0000000..d95f3ad
+--- /dev/null
++++ b/c/newfile2
+@@ -0,0 +1 @@
++content
+EOF
+
+test_expect_success 'apply --directory -p (new file)' '
+ git reset --hard initial &&
+ git apply -p2 --directory=some/sub/dir/ --index patch &&
+ test content = $(git show :some/sub/dir/newfile2) &&
+ test content = $(cat some/sub/dir/newfile2)
+'
+
+cat > patch << EOF
diff --git a/delfile b/delfile
deleted file mode 100644
index d95f3ad..0000000