aboutsummaryrefslogtreecommitdiff
path: root/t/t4252
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-11 22:21:48 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-12 02:26:01 -0800
commitb47dfe9e9c86be97fc07c4c04e26a303730f76c6 (patch)
treeac70929812c01e40e797abf3c53cbf13bc53ccdc /t/t4252
parentd727f676ad9f03c2b2a11ea68a2c6242ca02fa10 (diff)
downloadgit-b47dfe9e9c86be97fc07c4c04e26a303730f76c6.tar.gz
git-b47dfe9e9c86be97fc07c4c04e26a303730f76c6.tar.xz
git-am: add --directory=<dir> option
Thanks to a200337 (git-am: propagate -C<n>, -p<n> options as well, 2008-12-04) and commits around it, "git am" is equipped to correctly propagate the command line flags such as -C/-p/-whitespace across a patch failure and restart. It is trivial to support --directory option now, resurrecting previous attempts by Kevin and Simon. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4252')
-rw-r--r--t/t4252/am-test-5-120
-rw-r--r--t/t4252/am-test-5-215
2 files changed, 35 insertions, 0 deletions
diff --git a/t/t4252/am-test-5-1 b/t/t4252/am-test-5-1
new file mode 100644
index 000000000..da7bf29cb
--- /dev/null
+++ b/t/t4252/am-test-5-1
@@ -0,0 +1,20 @@
+From: A U Thor <au.thor@example.com>
+Date: Thu Dec 4 16:00:00 2008 -0800
+Subject: Six
+
+Applying this patch with --directory='frotz nitfol' should fail
+
+diff --git i/junk/file-2 w/junk/file-2
+index 06e567b..b6f3a16 100644
+--- i/junk/file-2
++++ w/junk/file-2
+@@ -1,7 +1,7 @@
+ One
+ 2
+-3
++Three
+ 4
+ 5
+-6
++Six
+ 7
diff --git a/t/t4252/am-test-5-2 b/t/t4252/am-test-5-2
new file mode 100644
index 000000000..373025bcf
--- /dev/null
+++ b/t/t4252/am-test-5-2
@@ -0,0 +1,15 @@
+From: A U Thor <au.thor@example.com>
+Date: Thu Dec 4 16:00:00 2008 -0800
+Subject: Six
+
+Applying this patch with --directory='frotz nitfol' should succeed
+
+diff --git i/file-5 w/file-5
+new file mode 100644
+index 000000..1d6ed9f
+--- /dev/null
++++ w/file-5
+@@ -0,0 +1,3 @@
++One
++two
++three