{"thread":{"id":"26104","subject":"[PATCH v2] am: Allow passing exclude and include args to apply","startedAt":"2010-12-19T18:22:39Z","lastAt":"2010-12-19T18:22:39Z","messageCount":1,"participants":["maximilian attems"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"158365","messageId":"1292782959-27887-1-git-send-email-max@stro.at","threadId":"26104","inReplyTo":null,"subject":"[PATCH v2] am: Allow passing exclude and include args to apply","fromName":"maximilian attems","fromEmail":"max@stro.at","sentAt":"2010-12-19T18:22:39Z","receivedAt":"2010-12-19T18:22:39Z","isPatch":true,"sender":{"key":"max@stro.at","avatar":"https://avatars.githubusercontent.com/u/1266461?v=4"},"body":"am already allows to pass several flags to apply as directory or reject,\nbut not yet the exclude and include args.\n\nWhen porting dash patches from dash git to klibc git, where dash has a\ndifferent directory structure, the exclude and include am switches are handy:\nExported with format-patch on dash side and used am as import for klibc side.\n\nCc: klibc@zytor.com\nCc: Thiago Farina <tfransosi@gmail.com>\nCc: Sam Ravnborg <sam@ravnborg.org>\nSigned-off-by: maximilian attems <max@stro.at>\n---\n Documentation/git-am.txt |    5 ++++-\n git-am.sh                |    4 +++-\n 2 files changed, 7 insertions(+), 2 deletions(-)\n\n\ndiff --git a/Documentation/git-am.txt b/Documentation/git-am.txt\nindex 51297d0..4c65dba 100644\n--- a/Documentation/git-am.txt\n+++ b/Documentation/git-am.txt\n@@ -13,7 +13,8 @@ SYNOPSIS\n \t [--3way] [--interactive] [--committer-date-is-author-date]\n \t [--ignore-date] [--ignore-space-change | --ignore-whitespace]\n \t [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]\n-\t [--reject] [-q | --quiet] [--scissors | --no-scissors]\n+\t [--exclude=PATH] [--include=PATH] [--reject] [-q | --quiet]\n+\t [--scissors | --no-scissors]\n \t [(<mbox> | <Maildir>)...]\n 'git am' (--continue | --skip | --abort)\n \n@@ -87,6 +88,8 @@ default.   You can use `--no-utf8` to override this.\n -C<n>::\n -p<n>::\n --directory=<dir>::\n+--exclude=<path-pattern>::\n+--include=<path-pattern>::\n --reject::\n \tThese flags are passed to the 'git apply' (see linkgit:git-apply[1])\n \tprogram that applies\ndiff --git a/git-am.sh b/git-am.sh\nindex df09b42..174f6a2 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -22,6 +22,8 @@ whitespace=     pass it through git-apply\n ignore-space-change pass it through git-apply\n ignore-whitespace pass it through git-apply\n directory=      pass it through git-apply\n+exclude=        pass it through git-apply\n+include=        pass it through git-apply\n C=              pass it through git-apply\n p=              pass it through git-apply\n patch-format=   format the patch(es) are in\n@@ -340,7 +342,7 @@ do\n \t\t;;\n \t--resolvemsg)\n \t\tshift; resolvemsg=$1 ;;\n-\t--whitespace|--directory)\n+\t--whitespace|--directory|--exclude|--include)\n \t\tgit_apply_opt=\"$git_apply_opt $(sq \"$1=$2\")\"; shift ;;\n \t-C|-p)\n \t\tgit_apply_opt=\"$git_apply_opt $(sq \"$1$2\")\"; shift ;;\n-- \n1.7.2.3\n"}]}