@matheusbsbs / matheus-bagliano / commits / 11027d544b
Fork 0

git-gui: Add option for changing the width of the commit message text box

The width of the commit message text area is currently hard-coded to 75 characters. This value might be not optimal for some projects. For instance users who would like to generate GNU-style ChangeLog file from git commit message might prefer commit messages of width no longer than 70 characters. This patch adds a global and per repository option "Commit Message Text Width", which could be used to change the width of the commit message text area. Signed-off-by: Adam Piątyszek <ediap@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Adam Piątyszek committed Mar 6, 2008 at 20:38 UTC 11027d544b4f6aed0b84111a2122224cd201a182
2 files changed +3 -1
git-gui.sh
+2 -1
@@ -611,6 +611,7 @@ set default_config(gui.matchtrackingbranch) false
611 set default_config(gui.pruneduringfetch) false
612 set default_config(gui.trustmtime) false
613 set default_config(gui.diffcontext) 5
614 +set default_config(gui.commitmsgwidth) 75
615 set default_config(gui.newbranchtemplate) {}
616 set default_config(gui.spellingdictionary) {}
617 set default_config(gui.fontui) [font configure font_ui]
@@ -2424,7 +2425,7 @@ text $ui_comm -background white -foreground black \
2425 -maxundo 20 \
2426 -autoseparators true \
2427 -relief sunken \
2427 - -width 75 -height 9 -wrap none \
2428 + -width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \
2429 -font font_diff \
2430 -yscrollcommand {.vpane.lower.commarea.buffer.sby set}
2431 scrollbar .vpane.lower.commarea.buffer.sby \
lib/option.tcl
+1
@@ -124,6 +124,7 @@ proc do_options {} {
124 {b gui.pruneduringfetch {mc "Prune Tracking Branches During Fetch"}}
125 {b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
126 {i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
127 + {i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
128 {t gui.newbranchtemplate {mc "New Branch Name Template"}}
129 } {
130 set type [lindex $option 0]