summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f00d504)
raw | patch | inline | side by side (parent: f00d504)
author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 12 Oct 2007 04:54:15 +0000 (00:54 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 12 Oct 2007 04:54:15 +0000 (00:54 -0400) |
Using the new --null option added to git-config in git 1.5.3 we
can safely accept LFs that are embedded in configuration options.
This does require a completely different configuration file parser
then the pre 1.5.3 version as we are splitting on very different
values.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
can safely accept LFs that are embedded in configuration options.
This does require a completely different configuration file parser
then the pre 1.5.3 version as we are splitting on very different
values.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index cfed62da440e420bae6088bf280c1834775874c1..a6e2d57a2ff6b25f873fc596f1d47ac5893f0a64 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
## config file parsing
git-version proc _parse_config {arr_name args} {
+ >= 1.5.3 {
+ upvar $arr_name arr
+ array unset arr
+ set buf {}
+ catch {
+ set fd_rc [eval [list git_read config --null --list] $args]
+ fconfigure $fd_rc -translation binary
+ set buf [read $fd_rc]
+ close $fd_rc
+ }
+ foreach line [split $buf "\0"] {
+ if {[regexp {^([^\n]+)\n(.*)$} $line line name value]} {
+ if {[is_many_config $name]} {
+ lappend arr($name) $value
+ } else {
+ set arr($name) $value
+ }
+ }
+ }
+ }
default {
upvar $arr_name arr
array unset arr