{"thread":{"id":"43277","subject":"[PATCH] Add --bool and --int to the OPTIONS section","startedAt":"2006-11-28T12:02:43Z","lastAt":"2006-11-29T10:09:42Z","messageCount":4,"participants":["Andy Parkins","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"298505","messageId":"200611281202.43394.andyparkins@gmail.com","threadId":"43277","inReplyTo":null,"subject":"[PATCH] Add support for commit.signoff config option","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2006-11-28T12:02:43Z","receivedAt":"2006-11-28T12:02:43Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"Whether patches require signing off or not is probably a per-project\nsetting rather than a per-commit setting.  Therefore as a convenience to\nthe user, the commit.signoff setting will automtically add --signoff to\ncommits.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n\n git-commit.sh |   15 ++++++++++++---\n 1 files changed, 12 insertions(+), 3 deletions(-)\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 81c3a0c..c45af10 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -66,9 +66,7 @@ trap '\n \trm -f \"$NEXT_INDEX\"\n ' 0\n \n-################################################################\n-# Command line argument parsing and sanity checking\n-\n+# Init\n all=\n also=\n only=\n@@ -85,6 +83,17 @@ signoff=\n force_author=\n only_include_assumed=\n untracked_files=\n+\n+# Config\n+case \"$(git-repo-config --get commit.signoff)\" in\n+1|on|yes|true)\n+\tsignoff=t\n+\t;;\n+esac\n+\n+################################################################\n+# Command line argument parsing and sanity checking\n+\n while case \"$#\" in 0) break;; esac\n do\n \tcase \"$1\" in\n-- \n1.4.3.GIT-dirty\n"},{"id":"294595","messageId":"7vd5772unw.fsf@assigned-by-dhcp.cox.net","threadId":"43277","inReplyTo":"200611281202.43394.andyparkins@gmail.com","subject":"Re: [PATCH] Add support for commit.signoff config option","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-28T20:17:07Z","receivedAt":"2006-11-28T20:17:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Parkins <andyparkins@gmail.com> writes:\n\n> Whether patches require signing off or not is probably a per-project\n> setting rather than a per-commit setting.  Therefore as a convenience to\n> the user, the commit.signoff setting will automtically add --signoff to\n> commits.\n>\n> Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n\nI muttered something about commit templates which would make\nthis change a moot point, but independent of that...\n\n> +# Config\n> +case \"$(git-repo-config --get commit.signoff)\" in\n> +1|on|yes|true)\n> +\tsignoff=t\n> +\t;;\n> +esac\n\nthis is ugly; please use --bool and check only for 'true'.\n\n\n"},{"id":"294203","messageId":"200611290825.40953.andyparkins@gmail.com","threadId":"43277","inReplyTo":"7vd5772unw.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Add --bool and --int to the OPTIONS section","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2006-11-29T08:25:40Z","receivedAt":"2006-11-29T08:25:40Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n---\nI did look for just such an option, but didn't find it because it wasn't in \nthe OPTIONS list of the git-repo-config man page.  If there is an OPTIONS \nsection it should include all options, otherwise it's no use as a quick \nreference.\n\nYour template commit message is an excellent idea, but I don't like the idea \nof simply hard coding sign off line into it; it means that there are then two \nlocations in the .git tree that I'd have to edit to change my name.  \nTherefore any template would have to support token expansion so that \"S-o-B: \n$REPOSITORY_EMAIL\" would be possible.  Even better would be support \nfor \"$GIT_STATUS_OUTPUT\" and \"$GIT_DIFF_OUTPUT\" so that the commit message is \ncompletely templated.\n\n Documentation/git-repo-config.txt |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-repo-config.txt \nb/Documentation/git-repo-config.txt\nindex 8199615..5bede9a 100644\n--- a/Documentation/git-repo-config.txt\n+++ b/Documentation/git-repo-config.txt\n@@ -77,6 +77,12 @@ OPTIONS\n -l, --list::\n \tList all variables set in config file.\n \n+--bool::\n+\tgit-repo-config will ensure that the output is \"true\" or \"false\"\n+\n+--int::\n+\tgit-repo-config will ensure that the output is a simple decimal number\n+\n \n ENVIRONMENT\n -----------\n-- \n1.4.3.GIT-dirty\n"},{"id":"297095","messageId":"Pine.LNX.4.63.0611291107130.30004@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"43277","inReplyTo":"200611290825.40953.andyparkins@gmail.com","subject":"Re: [PATCH] Add --bool and --int to the OPTIONS section","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-11-29T10:09:42Z","receivedAt":"2006-11-29T10:09:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 29 Nov 2006, Andy Parkins wrote:\n\n> Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n> ---\n\nYou might want to use a more-to-the-point subject, and move this into the \ncommit message:\n\n> I did look for just such an option, but didn't find it because it wasn't \n> in the OPTIONS list of the git-repo-config man page.  If there is an \n> OPTIONS section it should include all options, otherwise it's no use as \n> a quick reference.\n\nAnd this belongs into another mail:\n\n> Your template commit message is an excellent idea, but I don't like the idea \n> of simply hard coding sign off line into it; it means that there are then two \n> locations in the .git tree that I'd have to edit to change my name. \n> [...]\n\nBut to answer your concern: you would do this as a hook, which is a script \nin which you do not put your name directly. Rather, this script gets the \ncurrent author name by calling either git-var or git-repo-config.\n\nCiao,\nDscho\n"}]}