return $allknown
}
+proc git-rev-parse {args} {
+ set ids {}
+ set pipe [open |[linsert $args 0 git rev-parse] r]
+ while {[gets $pipe line] != -1} {
+ lappend ids $line
+ }
+ close $pipe
+ return $ids
+}
+
proc parseviewrevs {view revs} {
global vposids vnegids
if {$revs eq {}} {
set revs HEAD
}
- if {[catch {set ids [eval exec git rev-parse $revs]} err]} {
+ if {[catch {set ids [git-rev-parse $revs]} err]} {
# we get stdout followed by stderr in $err
# for an unknown rev, git rev-parse echoes it and then errors out
set errlines [split $err "\n"]
set pos {}
set neg {}
set sdm 0
- foreach id [split $ids "\n"] {
+ foreach id $ids {
if {$id eq "--gitk-symmetric-diff-marker"} {
set sdm 4
} elseif {[string match "^*" $id]} {