Re: [PATCH] git-am: create a config setting for reject control.
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 29, 2010, 02:11 UTC
- Message-ID
- <20101029021148.GC28984@burratino>
- 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.
[...]
Show 9 quoted lines
> +++ 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"