Skip to content

Commit

Permalink
Pass arguments through git-rev-parse.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Paul Mackerras committed Jun 21, 2005
1 parent a823a91 commit 2efef4b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@ proc getcommits {rargs} {
global startmsecs nextupdate
global ctext maincursor textcursor nlines

if {$rargs == {}} {
set rargs HEAD
}
set commits {}
set phase getcommits
set startmsecs [clock clicks -milliseconds]
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"
exit 1
}
Expand Down

0 comments on commit 2efef4b

Please sign in to comment.