* [PATCH] git-am: Pass the --directory option through to git-apply
@ 2008-08-29 22:27 Kevin Ballard
2008-08-31 6:30 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ballard @ 2008-08-29 22:27 UTC (permalink / raw)
To: git; +Cc: Kevin Ballard, Junio C Hamano
Signed-off-by: Kevin Ballard <kevin@sb.org>
---
Documentation/git-am.txt | 1 +
git-am.sh | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index b9c6fac..64c8178 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -66,6 +66,7 @@ default. You could use `--no-utf8` to override this.
-C<n>::
-p<n>::
+--directory=<root>::
These flags are passed to the 'git-apply' (see linkgit:git-apply[1])
program that applies
the patch.
diff --git a/git-am.sh b/git-am.sh
index aa60261..7e7a86f 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -18,6 +18,7 @@ k,keep pass -k flag to git-mailinfo
whitespace= pass it through git-apply
C= pass it through git-apply
p= pass it through git-apply
+directory= pass it through git-apply
resolvemsg= override error message when patch failure occurs
r,resolved to be used after a patch failure
skip skip the current patch
@@ -155,7 +156,7 @@ do
;;
--resolvemsg)
shift; resolvemsg=$1 ;;
- --whitespace)
+ --whitespace|--directory)
git_apply_opt="$git_apply_opt $1=$2"; shift ;;
-C|-p)
git_apply_opt="$git_apply_opt $1$2"; shift ;;
--
1.6.0.1.207.g020e5.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] git-am: Pass the --directory option through to git-apply
2008-08-29 22:27 [PATCH] git-am: Pass the --directory option through to git-apply Kevin Ballard
@ 2008-08-31 6:30 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2008-08-31 6:30 UTC (permalink / raw)
To: Kevin Ballard; +Cc: git, Michael S. Tsirkin
Kevin Ballard <kevin@sb.org> writes:
> diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
> index b9c6fac..64c8178 100644
> --- a/Documentation/git-am.txt
> +++ b/Documentation/git-am.txt
> @@ -66,6 +66,7 @@ default. You could use `--no-utf8` to override this.
>
> -C<n>::
> -p<n>::
> +--directory=<root>::
> These flags are passed to the 'git-apply' (see linkgit:git-apply[1])
> program that applies
> the patch.
> diff --git a/git-am.sh b/git-am.sh
> index aa60261..7e7a86f 100755
> --- a/git-am.sh
> +++ b/git-am.sh
> @@ -18,6 +18,7 @@ k,keep pass -k flag to git-mailinfo
> whitespace= pass it through git-apply
> C= pass it through git-apply
> p= pass it through git-apply
> +directory= pass it through git-apply
> resolvemsg= override error message when patch failure occurs
> r,resolved to be used after a patch failure
> skip skip the current patch
> @@ -155,7 +156,7 @@ do
> ;;
> --resolvemsg)
> shift; resolvemsg=$1 ;;
> - --whitespace)
> + --whitespace|--directory)
> git_apply_opt="$git_apply_opt $1=$2"; shift ;;
> -C|-p)
> git_apply_opt="$git_apply_opt $1$2"; shift ;;
Thanks, will queue.
This inherits an ancient breakage that was introduced to the --whitespace
option by 67dad68 (add -C[NUM] to git-am, 2007-02-08), in that you need to
give the next "git am" session the same option when you get a conflict and
need to restart. We should fix this ancient breakage by recording the
miscellaneous options that we append to $git_apply_opt variable (we should
remove the use of "$dotest/whitespace" that is now a no-op but 67dad68 did
not remove). That is a separate topic anyway, but the end result should:
* Save the options in effect in $dotest/, just like "sign", "utf8" and
"keep" are kept;
* Upon command startup, read the saved options, and then let the command
line options override them (which is not what the current code does, by
the way);
so that you can give necessary --directory, --whitespace, -C etc. options
when you feed your series to "git-am", and after fixing up a rejected
patch, you can continue without typing the same set of options again.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-31 6:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-29 22:27 [PATCH] git-am: Pass the --directory option through to git-apply Kevin Ballard
2008-08-31 6:30 ` Junio C Hamano
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).