From: Jonathan Nieder <jrnieder@gmail.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-am: create a config setting for reject control.
Date: Thu, 28 Oct 2010 21:11:48 -0500 [thread overview]
Message-ID: <20101029021148.GC28984@burratino> (raw)
In-Reply-To: <1288315650-2488-1-git-send-email-paul.gortmaker@windriver.com>
Paul Gortmaker wrote:
> This adds a config option for it, and a --no-reject
> so that you can manually override it.
Documentation? (to put in Documentation/config.txt) A test or two
would be nice, too --- see 6d8d8e0d for example.
[...]
> +++ b/git-am.sh
> @@ -306,6 +307,11 @@ then
> keepcr=t
> fi
>
> +if test "$(git config --bool --get am.reject)" = true
> +then
> + reject=t
> +fi
Something like the following is tempting, but I suspect "git rebase"
already copes. Another potential test. :)
Hope that helps.
Jonathan
diff --git a/git-am.sh b/git-am.sh
index 43a510f..b9fdb5a 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -307,10 +307,7 @@ then
keepcr=t
fi
-if test "$(git config --bool --get am.reject)" = true
-then
- reject=t
-fi
+reject=config
while test $# != 0
do
@@ -378,6 +375,17 @@ do
shift
done
+if test "$reject" = config
+then
+ if test "$rebasing" != t &&
+ "$(git config --bool --get am.reject)" = true
+ then
+ reject=t
+ else
+ reject=
+ fi
+fi
+
if test "$reject" = t
then
git_apply_opt="$git_apply_opt --reject"
next prev parent reply other threads:[~2010-10-29 2:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 1:27 [PATCH] git-am: create a config setting for reject control Paul Gortmaker
2010-10-29 2:11 ` Jonathan Nieder [this message]
2010-10-29 16:20 ` Junio C Hamano
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=20101029021148.GC28984@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=paul.gortmaker@windriver.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).