git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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"
Previous: Paul GortmakerNext: Junio C Hamano
Message 2 of 3 in “git-am: create a config setting for reject control.”
  1. git-am: create a config setting for reject control.Paul Gortmaker, Oct 29, 2010
  2. Jonathan NiederOct 29, 2010
  3. Junio C HamanoOct 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.