{"thread":{"id":"12547","subject":"[PATCH] git-gui: Add option for changing the width of the commit message text box","startedAt":"2008-03-06T19:38:40Z","lastAt":"2008-03-08T02:00:26Z","messageCount":2,"participants":["Adam Piątyszek","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"71268","messageId":"1204832320-22800-1-git-send-email-ediap@users.sourceforge.net","threadId":"12547","inReplyTo":null,"subject":"[PATCH] git-gui: Add option for changing the width of the commit message text box","fromName":"Adam Piątyszek","fromEmail":"ediap@users.sourceforge.net","sentAt":"2008-03-06T19:38:40Z","receivedAt":"2008-03-06T19:38:40Z","isPatch":true,"sender":{"key":"ediap@users.sourceforge.net","avatar":null},"body":"The width of the commit message text area is currently hard-coded\nto 75 characters. This value might be not optimal for some projects.\nFor instance users who would like to generate GNU-style ChangeLog\nfile from git commit message might prefer commit messages of width\nno longer than 70 characters.\n\nThis patch adds a global and per repository option \"Commit Message\nText Width\", which could be used to change the width of the commit\nmessage text area.\n\nSigned-off-by: Adam Piątyszek <ediap@users.sourceforge.net>\n---\nIdeally, I would like to have an automated line wrapping in the commit\nmessage text area. Unfortunately the \"-wrap words\" switch only wraps the\nlines for displaying purposes and this has no effect on the committed message\nitself.\n\nAnyway, the patch I prepared allows at least for configuring the width of\nthe commit message text box, so it is easier to manually wrap lines to\nexpected width.\n\nThis patch is against git.git's master branch. I hope this is fine.\n\n/Adam\n\n git-gui/git-gui.sh     |    3 ++-\n git-gui/lib/option.tcl |    1 +\n 2 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex 238a239..f617a4a 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -611,6 +611,7 @@ set default_config(gui.matchtrackingbranch) false\n set default_config(gui.pruneduringfetch) false\n set default_config(gui.trustmtime) false\n set default_config(gui.diffcontext) 5\n+set default_config(gui.commitmsgwidth) 75\n set default_config(gui.newbranchtemplate) {}\n set default_config(gui.spellingdictionary) {}\n set default_config(gui.fontui) [font configure font_ui]\n@@ -2421,7 +2422,7 @@ text $ui_comm -background white -borderwidth 1 \\\n \t-maxundo 20 \\\n \t-autoseparators true \\\n \t-relief sunken \\\n-\t-width 75 -height 9 -wrap none \\\n+\t-width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \\\n \t-font font_diff \\\n \t-yscrollcommand {.vpane.lower.commarea.buffer.sby set}\n scrollbar .vpane.lower.commarea.buffer.sby \\\ndiff --git a/git-gui/lib/option.tcl b/git-gui/lib/option.tcl\nindex ea80df0..9270512 100644\n--- a/git-gui/lib/option.tcl\n+++ b/git-gui/lib/option.tcl\n@@ -124,6 +124,7 @@ proc do_options {} {\n \t\t{b gui.pruneduringfetch {mc \"Prune Tracking Branches During Fetch\"}}\n \t\t{b gui.matchtrackingbranch {mc \"Match Tracking Branches\"}}\n \t\t{i-0..99 gui.diffcontext {mc \"Number of Diff Context Lines\"}}\n+\t\t{i-0..99 gui.commitmsgwidth {mc \"Commit Message Text Width\"}}\n \t\t{t gui.newbranchtemplate {mc \"New Branch Name Template\"}}\n \t\t} {\n \t\tset type [lindex $option 0]\n-- \n1.5.4.3.450.gb92176.dirty\n\n"},{"id":"71396","messageId":"20080308020026.GV8410@spearce.org","threadId":"12547","inReplyTo":"1204832320-22800-1-git-send-email-ediap@users.sourceforge.net","subject":"Re: [PATCH] git-gui: Add option for changing the width of the commit message text box","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-03-08T02:00:26Z","receivedAt":"2008-03-08T02:00:26Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Adam Pityszek <ediap@users.sourceforge.net> wrote:\n> The width of the commit message text area is currently hard-coded\n> to 75 characters. This value might be not optimal for some projects.\n> For instance users who would like to generate GNU-style ChangeLog\n> file from git commit message might prefer commit messages of width\n> no longer than 70 characters.\n> \n> This patch adds a global and per repository option \"Commit Message\n> Text Width\", which could be used to change the width of the commit\n> message text area.\n\nThanks.\n \n> Ideally, I would like to have an automated line wrapping in the commit\n> message text area. Unfortunately the \"-wrap words\" switch only wraps the\n> lines for displaying purposes and this has no effect on the committed message\n> itself.\n \nYea, I fought with that myself for a while and just settled on\na 75 character wide text area.\n\n-- \nShawn.\n"}]}