Skip to content

Commit 58725ef

Browse files
jmberggitster
authored andcommitted
am: support --include option
am supports a number of pass-through options to apply, like --exclude and --directory. Add --include to this list. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2ae7345 commit 58725ef

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Documentation/git-am.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SYNOPSIS
1313
[--3way] [--interactive] [--committer-date-is-author-date]
1414
[--ignore-date] [--ignore-space-change | --ignore-whitespace]
1515
[--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
16-
[--exclude=<path>] [--reject] [-q | --quiet]
16+
[--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
1717
[--scissors | --no-scissors]
1818
[(<mbox> | <Maildir>)...]
1919
'git am' (--continue | --skip | --abort)
@@ -89,6 +89,7 @@ default. You can use `--no-utf8` to override this.
8989
-p<n>::
9090
--directory=<dir>::
9191
--exclude=<path>::
92+
--include=<path>::
9293
--reject::
9394
These flags are passed to the 'git apply' (see linkgit:git-apply[1])
9495
program that applies

git-am.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ignore-space-change pass it through git-apply
2323
ignore-whitespace pass it through git-apply
2424
directory= pass it through git-apply
2525
exclude= pass it through git-apply
26+
include= pass it through git-apply
2627
C= pass it through git-apply
2728
p= pass it through git-apply
2829
patch-format= format the patch(es) are in
@@ -363,7 +364,7 @@ do
363364
;;
364365
--resolvemsg)
365366
shift; resolvemsg=$1 ;;
366-
--whitespace|--directory|--exclude)
367+
--whitespace|--directory|--exclude|--include)
367368
git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;;
368369
-C|-p)
369370
git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;

0 commit comments

Comments
 (0)