Teach git-am to pass -p option down to git-apply
This is originally from Andy Parkins whose patch used --patchdepth; let's use -p which is more in line with the underlying git-apply. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Feb 11, 2007 at 22:05 UTC
2092a1fefdacf9839332202fa62165e2ac91c899
2 files changed
+6
-8
Documentation/git-am.txt
+4
-3
@@ -10,7 +10,8 @@ SYNOPSIS
10
--------
11
[verse]
12
'git-am' [--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]
13
- [--interactive] [--whitespace=<option>] <mbox>...
13
+ [--interactive] [--whitespace=<option>] [-C<n>] [-p<n>]
14
+ <mbox>...
15
'git-am' [--skip | --resolved]
16
17
DESCRIPTION
@@ -68,8 +69,8 @@ default. You could use `--no-utf8` to override this.
69
This flag is passed to the `git-apply` program that applies
70
the patch.
71
71
--C<n>::
72
- This flag is passed to the `git-apply` program that applies
72
+-C<n>, -p<n>::
73
+ These flag are passed to the `git-apply` program that applies
74
the patch.
75
76
--interactive::
git-am.sh
+2
-5
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005, 2006 Junio C Hamano
4
5
USAGE='[--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]
6
- [--interactive] [--whitespace=<option>] [-CNUM] <mbox>...
6
+ [--interactive] [--whitespace=<option>] [-C<n>] [-p<n>] <mbox>...
7
or, when resuming [--skip | --resolved]'
8
. git-sh-setup
9
set_reflog_action am
@@ -142,10 +142,7 @@ do
142
--sk|--ski|--skip)
143
skip=t; shift ;;
144
145
- --whitespace=*)
146
- git_apply_opt="$git_apply_opt $1"; shift ;;
147
-
148
- -C*)
145
+ --whitespace=*|-C*|-p*)
146
git_apply_opt="$git_apply_opt $1"; shift ;;
147
148
--resolvemsg=*)