Browse Source

Pass arguments through git-rev-parse.

This allows the user to specify ranges more flexibly; for instance
the user can now do "gitk v2.6.12.." and see all the changes since
2.6.12.
maint
Paul Mackerras 20 years ago
parent
commit
2efef4b9b5
  1. 16
      gitk

16
gitk

@ -14,14 +14,22 @@ proc getcommits {rargs} {
global startmsecs nextupdate global startmsecs nextupdate
global ctext maincursor textcursor nlines global ctext maincursor textcursor nlines


if {$rargs == {}} {
set rargs HEAD
}
set commits {} set commits {}
set phase getcommits set phase getcommits
set startmsecs [clock clicks -milliseconds] set startmsecs [clock clicks -milliseconds]
set nextupdate [expr $startmsecs + 100] set nextupdate [expr $startmsecs + 100]
if [catch {set commfd [open "|git-rev-list --merge-order $rargs" r]} err] { if [catch {
set parse_args [concat --default HEAD --merge-order $rargs]
set parsed_args [split [eval exec git-rev-parse $parse_args] "\n"]
}] {
if {$rargs == {}} {
set rargs HEAD
}
set parsed_args [concat --merge-order $rargs]
}
if [catch {
set commfd [open "|git-rev-list $parsed_args" r]
} err] {
puts stderr "Error executing git-rev-list: $err" puts stderr "Error executing git-rev-list: $err"
exit 1 exit 1
} }

Loading…
Cancel
Save