aboutsummaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-06-21 10:20:04 +1000
committerPaul Mackerras <paulus@samba.org>2005-06-21 10:20:04 +1000
commit2efef4b9b5e65b436eff3b481edc273204453c72 (patch)
tree1b1397489cad6ce3cc958d626bbee591fdf26cd5 /gitk
parenta823a91131616c28f9c3ef5601b09b7e01393204 (diff)
downloadgit-2efef4b9b5e65b436eff3b481edc273204453c72.tar.gz
git-2efef4b9b5e65b436eff3b481edc273204453c72.tar.xz
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.
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk16
1 files changed, 12 insertions, 4 deletions
diff --git a/gitk b/gitk
index d50999895..fef705ce9 100755
--- a/gitk
+++ b/gitk
@@ -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
}