diff options
| author | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2025-03-15 15:09:13 +0100 |
|---|---|---|
| committer | Johannes Sixt <j6t@kdbg.org> | 2025-03-16 13:51:55 +0100 |
| commit | 6b43a57dfce1e5acd85f7a8365c080b6fc4f8645 (patch) | |
| tree | b0098d7a7a21b771b530e65e2364a823c907d6e6 /git-gui.sh | |
| parent | 90934966bbac07d8d480b5257ba50945f0ec45c8 (diff) | |
| download | git-6b43a57dfce1e5acd85f7a8365c080b6fc4f8645.tar.xz | |
git-gui: heed core.commentChar/commentString
This amends 1ae85ff6d (git-gui: strip comments and consecutive empty
lines from commit messages, 2024-08-13) to deal with custom comment
characters/strings.
The magic commentString value "auto" is not handled, because the option
makes no sense to me - it does not support comments in templates and
hook output, and it seems far-fetched that someone would introduce
comments during editing the message.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Diffstat (limited to 'git-gui.sh')
| -rwxr-xr-x | git-gui.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh index 8fe7538e72..2bc2c9b63e 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -880,6 +880,12 @@ proc apply_config {} { color::sync_with_theme } } + + global comment_string + set comment_string [get_config core.commentstring] + if {$comment_string eq {}} { + set comment_string [get_config core.commentchar] + } } set default_config(branch.autosetupmerge) true @@ -890,6 +896,8 @@ set default_config(merge.summary) false set default_config(merge.verbosity) 2 set default_config(user.name) {} set default_config(user.email) {} +set default_config(core.commentchar) "#" +set default_config(core.commentstring) {} set default_config(gui.encoding) [encoding system] set default_config(gui.matchtrackingbranch) false |
