Merge branch 'jb/am-include'
authorJunio C Hamano <gitster@pobox.com>
Fri, 20 Apr 2012 22:49:15 +0000 (15:49 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Apr 2012 22:49:16 +0000 (15:49 -0700)
"git am" learned the "--include" option, which is an opposite of existing
the "--exclude" option.

By Johannes Berg
* jb/am-include:
am: support --include option

Documentation/git-am.txt
git-am.sh
index ee6cca2e1333eb26b0913eb5c4eaf9f38e5855d9..19d57a80f572c221c6a4d678a0673996416c5208 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)
@@ -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
index 4da0ddafc4bf2029823148e7285085661c134497..928a35f4e0f7fe7dd29e7084a1a7c11175a9b9b7 100755 (executable)
--- 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 ;;