[PATCH] Add support for commit.signoff config option

Previous thread: Re: [PATCH] Trim hint printed when gecos is empty. by Jakub Narebski on Tuesday, November 28, 2006 - 7:15 am. (7 messages)

Next thread: Re: git and bzr by Jakub Narebski on Tuesday, November 28, 2006 - 8:37 am. (6 messages)
To: <git@...>
Date: Tuesday, November 28, 2006 - 8:02 am

Whether patches require signing off or not is probably a per-project
setting rather than a per-commit setting. Therefore as a convenience to
the user, the commit.signoff setting will automtically add --signoff to
commits.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---

git-commit.sh | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/git-commit.sh b/git-commit.sh
index 81c3a0c..c45af10 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -66,9 +66,7 @@ trap '
rm -f "$NEXT_INDEX"
' 0

-################################################################
-# Command line argument parsing and sanity checking
-
+# Init
all=
also=
only=
@@ -85,6 +83,17 @@ signoff=
force_author=
only_include_assumed=
untracked_files=
+
+# Config
+case "$(git-repo-config --get commit.signoff)" in
+1|on|yes|true)
+ signoff=t
+ ;;
+esac
+
+################################################################
+# Command line argument parsing and sanity checking
+
while case "$#" in 0) break;; esac
do
case "$1" in
--
1.4.3.GIT-dirty

-

Previous thread: Re: [PATCH] Trim hint printed when gecos is empty. by Jakub Narebski on Tuesday, November 28, 2006 - 7:15 am. (7 messages)

Next thread: Re: git and bzr by Jakub Narebski on Tuesday, November 28, 2006 - 8:37 am. (6 messages)