Re: [PATCH] git-am: create a config setting for reject control.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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"
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]