[PATCH] am: Allow passing exclude and include args to apply

Subsystems: documentation, the rest

DORMANTno replies

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

[PATCH] am: Allow passing exclude and include args to apply

From: maximilian attems <hidden>
Date: 2016-06-15 22:50:16

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

Signed-off-by: maximilian attems <redacted>
---
 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

Re: [PATCH] am: Allow passing exclude and include args to apply

From: Thiago Farina <hidden>
Date: 2016-06-15 22:50:16

On Sun, Dec 19, 2010 at 2:17 PM, maximilian attems [off-list ref] wrote:
When porting patches from dash git to klibc git,
where dash has a different directory structure those
switches are handy:
Exported with format-patch on dash side and used am
as import for klibc side.
I don't know, but this commit message doesn't look good. Can you be
more specific about what the patch does, and what it's trying to fix.
Describing a use case is good, but in this case it isn't help me much
(maybe for others the issue here is clear, but for my taste no).
quoted hunk
Signed-off-by: maximilian attems <redacted>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] am: Allow passing exclude and include args to apply

From: maximilian attems <hidden>
Date: 2016-06-15 22:50:16

On Sun, Dec 19, 2010 at 02:56:58PM -0200, Thiago Farina wrote:
On Sun, Dec 19, 2010 at 2:17 PM, maximilian attems [off-list ref] wrote:
quoted
When porting patches from dash git to klibc git,
where dash has a different directory structure those
switches are handy:
Exported with format-patch on dash side and used am
as import for klibc side.
I don't know, but this commit message doesn't look good. Can you be
more specific about what the patch does, and what it's trying to fix.
hmm, it does what the subject says. (:
have you ever used `git am'?
Describing a use case is good, but in this case it isn't help me much
(maybe for others the issue here is clear, but for my taste no).
when one wants to promote a specific new feature, it is much better to
come up with it's use case, as burden is on Maintainer to keep it working.

Please be more specific on what's missing? Your personal taste is
unknown to me and not of importance.

thank you.

-- 
maks

Re: [klibc] [PATCH] am: Allow passing exclude and include args to apply

From: Sam Ravnborg <hidden>
Date: 2016-06-15 22:50:16

On Sun, Dec 19, 2010 at 05:13:13PM +0000, maximilian attems wrote:
On Sun, Dec 19, 2010 at 02:56:58PM -0200, Thiago Farina wrote:
quoted
On Sun, Dec 19, 2010 at 2:17 PM, maximilian attems [off-list ref] wrote:
quoted
When porting patches from dash git to klibc git,
where dash has a different directory structure those
switches are handy:
Exported with format-patch on dash side and used am
as import for klibc side.
I don't know, but this commit message doesn't look good. Can you be
more specific about what the patch does, and what it's trying to fix.
hmm, it does what the subject says. (:
have you ever used `git am'?
...
Please be more specific on what's missing? Your personal taste is
unknown to me and not of importance.
I had to read it twice to get it..
Most likely because I read the changelog without reading the title first.

	Sam

Re: [klibc] [PATCH] am: Allow passing exclude and include args to apply

From: maximilian attems <hidden>
Date: 2016-06-15 22:50:16

On Sun, Dec 19, 2010 at 06:26:57PM +0100, Sam Ravnborg wrote:
I had to read it twice to get it..
Most likely because I read the changelog without reading the title first.

	Sam

thanks, fixed in v2.

-- 
maks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help