summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6636b88)
raw | patch | inline | side by side (parent: 6636b88)
author | Paul Mackerras <paulus@samba.org> | |
Thu, 10 Jan 2008 10:44:39 +0000 (21:44 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Thu, 10 Jan 2008 10:44:39 +0000 (21:44 +1100) |
Despite the name, the --revs-only flag to git rev-parse doesn't make
it output only revision IDs. It makes it output only arguments that
are suitable for giving to git rev-list. So make start_rev_list and
updatecommits cope with arguments output by git rev-parse that aren't
revision IDs. This way we won't get an error when an argument such as
"-300" has been given to gitk and the view is updated.
Signed-off-by: Paul Mackerras <paulus@samba.org>
it output only revision IDs. It makes it output only arguments that
are suitable for giving to git rev-list. So make start_rev_list and
updatecommits cope with arguments output by git rev-parse that aren't
revision IDs. This way we won't get an error when an argument such as
"-300" has been given to gitk and the view is updated.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 0dacfdadf1b17df160718b53ef39f441cd53515c..97d1be092aa41fb3dafe4a79dd4699c91bf23142 100755 (executable)
--- a/gitk
+++ b/gitk
$viewargs($view)]
set viewincl($view) {}
foreach c $commits {
- if {![string match "^*" $c]} {
+ if {[regexp {^[0-9a-fA-F]{40}$} $c]} {
lappend viewincl($view) $c
}
}
$viewargs($view)]
set pos {}
set neg {}
+ set flags {}
foreach c $commits {
if {[string match "^*" $c]} {
lappend neg $c
- } else {
+ } elseif {[regexp {^[0-9a-fA-F]{40}$} $c]} {
if {!([info exists varcid($view,$c)] ||
[lsearch -exact $viewincl($view) $c] >= 0)} {
lappend pos $c
}
+ } else {
+ lappend flags $c
}
}
if {$pos eq {}} {
set viewincl($view) [concat $viewincl($view) $pos]
if {[catch {
set fd [open [concat | git log --no-color -z --pretty=raw --parents \
- --boundary $pos $neg "--" $viewfiles($view)] r]
+ --boundary $pos $neg $flags "--" $viewfiles($view)] r]
} err]} {
error_popup "Error executing git log: $err"
exit 1