# [PATCH] am: support --include option

2 messages from 2012-03-28 to 2012-03-28. Participants: Johannes Berg, Ramkumar Ramachandra.
Thread: https://gitlist.dev/t/30081

## Johannes Berg, 2012-03-28 11:11

Subject: [PATCH] am: support --include option
Message-ID: <1332933088.3479.27.camel@jlt3.sipsolutions.net>
URL: https://gitlist.dev/e/1332933088.3479.27.camel%40jlt3.sipsolutions.net

```
am supports a number of pass-through options
to apply, like --exclude and --directory. Add
--include to this list.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 Documentation/git-am.txt |    3 ++-
 git-am.sh                |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index ee6cca2..19d57a8 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -13,7 +13,7 @@ SYNOPSIS
 	 [--3way] [--interactive] [--committer-date-is-author-date]
 	 [--ignore-date] [--ignore-space-change | --ignore-whitespace]
 	 [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
-	 [--exclude=<path>] [--reject] [-q | --quiet]
+	 [--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
 	 [--scissors | --no-scissors]
 	 [(<mbox> | <Maildir>)...]
 'git am' (--continue | --skip | --abort)
@@ -92,6 +92,7 @@ default.   You can use `--no-utf8` to override this.
 -p<n>::
 --directory=<dir>::
 --exclude=<path>::
+--include=<path>::
 --reject::
 	These flags are passed to the 'git apply' (see linkgit:git-apply[1])
 	program that applies
diff --git a/git-am.sh b/git-am.sh
index 4da0dda..928a35f 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -24,6 +24,7 @@ ignore-space-change pass it through git-apply
 ignore-whitespace pass it through git-apply
 directory=      pass it through git-apply
 exclude=        pass it through git-apply
+include=        pass it through git-apply
 C=              pass it through git-apply
 p=              pass it through git-apply
 patch-format=   format the patch(es) are in
@@ -412,7 +413,7 @@ do
 		;;
 	--resolvemsg)
 		shift; resolvemsg=$1 ;;
-	--whitespace|--directory|--exclude)
+	--whitespace|--directory|--exclude|--include)
 		git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;;
 	-C|-p)
 		git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;
-- 
1.7.9.1

```

## Ramkumar Ramachandra, 2012-03-28 11:26

Subject: Re: [PATCH] am: support --include option
Message-ID: <CALkWK0mvF=YWP5FDaDsY5OeW00_PqKokZ2t5Ev_cpbi0+2rJ+Q@mail.gmail.com>
URL: https://gitlist.dev/e/CALkWK0mvF%3DYWP5FDaDsY5OeW00_PqKokZ2t5Ev_cpbi0%2B2rJ%2BQ%40mail.gmail.com
In-Reply-To: <1332933088.3479.27.camel@jlt3.sipsolutions.net>

```
Hi Johannes,

Johannes Berg wrote:
> am supports a number of pass-through options
> to apply, like --exclude and --directory. Add
> --include to this list.

Looks good to me.  Thanks for working on this.

    Ram

```
