[TopGit PATCH] tg-create: let format.signoff control adding of Signed-off-by

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

 



GIT manual stresses that adding of Signed-off-by should be explicit
user decision. Some projects do ask for no Signed-off-by lines. So
make sure it is added by tg-create.sh only when explicity requested
by user.

Signed-off-by: Andrey Borzenkov <arvidjaar@xxxxxxxxx>

---
 tg-create.sh |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tg-create.sh b/tg-create.sh
index 2edd537..617031b 100644
--- a/tg-create.sh
+++ b/tg-create.sh
@@ -129,11 +129,9 @@ author_addr="${author%> *}>"
 	! subject_prefix="$(git config topgit.subjectprefix)" || subject_prefix="$subject_prefix "
 	echo "Subject: [${subject_prefix}PATCH] $name"
 	echo
-	cat <<EOT
-<patch description>
-
-Signed-off-by: $author_addr
-EOT
+	echo '<patch description>'
+	echo
+	[ "$(git config --bool format.signoff)" = true ] && echo "Signed-off-by: $author_addr"
 } >"$root_dir/.topmsg"
 git add -f "$root_dir/.topmsg"
 
-- 
tg: (d279e29..) u/signed-off-by (depends on: master)
--
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]