am: support --include option
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 28 Mar 2012 11:11:28 +0000 (13:11 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Mar 2012 17:44:55 +0000 (10:44 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-am.txt
git-am.sh

index 887466d7777bb3cedce976b55d446f0f7803c423..e4c08e122e726c10cdd31c7d70375654152dd6d3 100644 (file)
@@ -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)
@@ -89,6 +89,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
index 4ea2f2fe0eba4cba157b796b0c907cdab807d83e..2ecccfd723646d004a850ee222f6014acbf8d125 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -23,6 +23,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
@@ -363,7 +364,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 ;;