summaryrefslogtreecommitdiff
path: root/t/t4120-apply-popt.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-05 23:34:51 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-05 23:34:51 (GMT)
commit77e6f5bc1009aa588a3b2235758bf5be13b23d85 (patch)
treecb040ac72459291eda6adf1aa9f10778bc54cdbf /t/t4120-apply-popt.sh
parent33580fbd308593e36395926fd35b501976ad322a (diff)
parentb5da24679ec73f458988523dce9dd17b4e9b0e02 (diff)
downloadgit-77e6f5bc1009aa588a3b2235758bf5be13b23d85.zip
git-77e6f5bc1009aa588a3b2235758bf5be13b23d85.tar.gz
git-77e6f5bc1009aa588a3b2235758bf5be13b23d85.tar.bz2
Merge branch 'maint'
* maint: Fix lseek(2) calls with args 2 and 3 swapped Honor -p<n> when applying git diffs Fix dependency of common-cmds.h Fix renaming branch without config file DESTDIR support for git/contrib/emacs gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches Document --left-right option to rev-list. Revert "builtin-archive: use RUN_SETUP" rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email. rerere: make sorting really stable. Fix t4200-rerere for white-space from "wc -l"
Diffstat (limited to 't/t4120-apply-popt.sh')
-rwxr-xr-xt/t4120-apply-popt.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh
new file mode 100755
index 0000000..2f672f3
--- /dev/null
+++ b/t/t4120-apply-popt.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Shawn O. Pearce
+#
+
+test_description='git-apply -p handling.'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ mkdir sub &&
+ echo A >sub/file1 &&
+ cp sub/file1 file1 &&
+ git add sub/file1 &&
+ echo B >sub/file1 &&
+ git diff >patch.file &&
+ rm sub/file1 &&
+ rmdir sub
+'
+
+test_expect_success 'apply git diff with -p2' '
+ git apply -p2 patch.file
+'
+
+test_done