summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df75e86)
raw | patch | inline | side by side (parent: df75e86)
author | Alexander Gavrilov <angavrilov@gmail.com> | |
Sat, 23 Aug 2008 08:27:44 +0000 (12:27 +0400) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Tue, 26 Aug 2008 10:10:10 +0000 (20:10 +1000) |
Other GUI tools may need to start gitk and make it automatically
select a certain commit. This adds a new command-line option
--select-commit=id to make that possible.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
select a certain commit. This adds a new command-line option
--select-commit=id to make that possible.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 087c4ac733be4b788751d0bae5b7aad22ce0dd99..7698b7081706026f5e036ebdcbfe9ca8c9fc4506 100755 (executable)
--- a/gitk
+++ b/gitk
}
proc reset_pending_select {selid} {
- global pending_select mainheadid
+ global pending_select mainheadid selectheadid
if {$selid ne {}} {
set pending_select $selid
+ } elseif {$selectheadid ne {}} {
+ set pending_select $selectheadid
} else {
set pending_select $mainheadid
}
proc readrefs {} {
global tagids idtags headids idheads tagobjid
global otherrefids idotherrefs mainhead mainheadid
+ global selecthead selectheadid
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
catch {unset $v}
set mainhead [string range $thehead 11 end]
}
}
+ set selectheadid {}
+ if {$selecthead ne {}} {
+ catch {
+ set selectheadid [exec git rev-parse --verify $selecthead]
+ }
+ }
}
# skip over fake commits
exit 1
}
+set selecthead {}
+set selectheadid {}
+
set revtreeargs {}
set cmdline_files {}
set i 0
set cmdline_files [lrange $argv [expr {$i + 1}] end]
break
}
+ "--select-commit=*" {
+ set selecthead [string range $arg 16 end]
+ }
"--argscmd=*" {
set revtreeargscmd [string range $arg 10 end]
}
incr i
}
+if {$selecthead eq "HEAD"} {
+ set selecthead {}
+}
+
if {$i >= [llength $argv] && $revtreeargs ne {}} {
# no -- on command line, but some arguments (other than --argscmd)
if {[catch {