git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: maximilian attems <max@stro.at>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	maximilian attems <max@stro.at>,
	klibc@zytor.com, Thiago Farina <tfransosi@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH v2] am: Allow passing exclude and include args to apply
Date: Sun, 19 Dec 2010 19:22:39 +0100	[thread overview]
Message-ID: <1292782959-27887-1-git-send-email-max@stro.at> (raw)

am already allows to pass several flags to apply as directory or reject,
but not yet the exclude and include args.

When porting dash patches from dash git to klibc git, where dash has a
different directory structure, the exclude and include am switches are handy:
Exported with format-patch on dash side and used am as import for klibc side.

Cc: klibc@zytor.com
Cc: Thiago Farina <tfransosi@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 Documentation/git-am.txt |    5 ++++-
 git-am.sh                |    4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)


diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 51297d0..4c65dba 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -13,7 +13,8 @@ SYNOPSIS
 	 [--3way] [--interactive] [--committer-date-is-author-date]
 	 [--ignore-date] [--ignore-space-change | --ignore-whitespace]
 	 [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
-	 [--reject] [-q | --quiet] [--scissors | --no-scissors]
+	 [--exclude=PATH] [--include=PATH] [--reject] [-q | --quiet]
+	 [--scissors | --no-scissors]
 	 [(<mbox> | <Maildir>)...]
 'git am' (--continue | --skip | --abort)
 
@@ -87,6 +88,8 @@ default.   You can use `--no-utf8` to override this.
 -C<n>::
 -p<n>::
 --directory=<dir>::
+--exclude=<path-pattern>::
+--include=<path-pattern>::
 --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 df09b42..174f6a2 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -22,6 +22,8 @@ whitespace=     pass it through git-apply
 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
@@ -340,7 +342,7 @@ do
 		;;
 	--resolvemsg)
 		shift; resolvemsg=$1 ;;
-	--whitespace|--directory)
+	--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.2.3

                 reply	other threads:[~2010-12-19 18:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292782959-27887-1-git-send-email-max@stro.at \
    --to=max@stro.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=klibc@zytor.com \
    --cc=sam@ravnborg.org \
    --cc=tfransosi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).