[PATCH] gitk: Replace "git-" commands with "git "
git-* commands work only if gitexecdir is in PATH. Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Timo Hirvonen committed
May 24, 2006 at 10:57 UTC
8974c6f93e62cd4b6ffe93562a6569b8920a89a3
1 file changed
+26
-26
gitk
+26
-26
@@ -34,10 +34,10 @@ proc start_rev_list {view} {
34
set order "--date-order"
35
}
36
if {[catch {
37
- set fd [open [concat | git-rev-list --header $order \
37
+ set fd [open [concat | git rev-list --header $order \
38
--parents --boundary --default HEAD $args] r]
39
} err]} {
40
- puts stderr "Error executing git-rev-list: $err"
40
+ puts stderr "Error executing git rev-list: $err"
41
exit 1
42
}
43
set commfd($view) $fd
@@ -94,10 +94,10 @@ proc getcommitlines {fd view} {
94
}
95
if {[string range $err 0 4] == "usage"} {
96
set err "Gitk: error reading commits$fv:\
97
- bad arguments to git-rev-list."
97
+ bad arguments to git rev-list."
98
if {$viewname($view) eq "Command line"} {
99
append err \
100
- " (Note: arguments to gitk are passed to git-rev-list\
100
+ " (Note: arguments to gitk are passed to git rev-list\
101
to allow selection of commits to be displayed.)"
102
}
103
} else {
@@ -148,7 +148,7 @@ proc getcommitlines {fd view} {
148
if {[string length $shortcmit] > 80} {
149
set shortcmit "[string range $shortcmit 0 80]..."
150
}
151
- error_popup "Can't parse git-rev-list output: {$shortcmit}"
151
+ error_popup "Can't parse git rev-list output: {$shortcmit}"
152
exit 1
153
}
154
set id [lindex $ids 0]
@@ -217,7 +217,7 @@ proc doupdate {} {
217
}
218
219
proc readcommit {id} {
220
- if {[catch {set contents [exec git-cat-file commit $id]}]} return
220
+ if {[catch {set contents [exec git cat-file commit $id]}]} return
221
parsecommit $id $contents 0
222
}
223
@@ -276,8 +276,8 @@ proc parsecommit {id contents listed} {
276
set headline $comment
277
}
278
if {!$listed} {
279
- # git-rev-list indents the comment by 4 spaces;
280
- # if we got this via git-cat-file, add the indentation
279
+ # git rev-list indents the comment by 4 spaces;
280
+ # if we got this via git cat-file, add the indentation
281
set newcomment {}
282
foreach line [split $comment "\n"] {
283
append newcomment " "
@@ -337,14 +337,14 @@ proc readrefs {} {
337
set type {}
338
set tag {}
339
catch {
340
- set commit [exec git-rev-parse "$id^0"]
340
+ set commit [exec git rev-parse "$id^0"]
341
if {"$commit" != "$id"} {
342
set tagids($name) $commit
343
lappend idtags($commit) $name
344
}
345
}
346
catch {
347
- set tagcontents($name) [exec git-cat-file tag "$id"]
347
+ set tagcontents($name) [exec git cat-file tag "$id"]
348
}
349
} elseif { $type == "heads" } {
350
set headids($name) $id
@@ -1287,7 +1287,7 @@ proc vieweditor {top n title} {
1287
checkbutton $top.perm -text "Remember this view" -variable newviewperm($n)
1288
grid $top.perm - -pady 5 -sticky w
1289
message $top.al -aspect 1000 -font $uifont \
1290
- -text "Commits to include (arguments to git-rev-list):"
1290
+ -text "Commits to include (arguments to git rev-list):"
1291
grid $top.al - -sticky w -pady 5
1292
entry $top.args -width 50 -textvariable newviewargs($n) \
1293
-background white
@@ -2941,7 +2941,7 @@ proc findpatches {} {
2941
}
2942
2943
if {[catch {
2944
- set f [open [list | git-diff-tree --stdin -s -r -S$findstring \
2944
+ set f [open [list | git diff-tree --stdin -s -r -S$findstring \
2945
<< $inputids] r]
2946
} err]} {
2947
error_popup "Error starting search process: $err"
@@ -2973,7 +2973,7 @@ proc readfindproc {} {
2973
return
2974
}
2975
if {![regexp {^[0-9a-f]{40}} $line id]} {
2976
- error_popup "Can't parse git-diff-tree output: $line"
2976
+ error_popup "Can't parse git diff-tree output: $line"
2977
stopfindproc
2978
return
2979
}
@@ -3038,10 +3038,10 @@ proc findfiles {} {
3038
if {$l == $findstartline} break
3039
}
3040
3041
- # start off a git-diff-tree process if needed
3041
+ # start off a git diff-tree process if needed
3042
if {$diffsneeded ne {}} {
3043
if {[catch {
3044
- set df [open [list | git-diff-tree -r --stdin << $diffsneeded] r]
3044
+ set df [open [list | git diff-tree -r --stdin << $diffsneeded] r]
3045
} err ]} {
3046
error_popup "Error starting search process: $err"
3047
return
@@ -3071,7 +3071,7 @@ proc readfilediffs {df} {
3071
if {[catch {close $df} err]} {
3072
stopfindproc
3073
bell
3074
- error_popup "Error in git-diff-tree: $err"
3074
+ error_popup "Error in git diff-tree: $err"
3075
} elseif {[info exists findid]} {
3076
set id $findid
3077
stopfindproc
@@ -3098,7 +3098,7 @@ proc donefilediff {} {
3098
if {[info exists fdiffid]} {
3099
while {[lindex $fdiffsneeded $fdiffpos] ne $fdiffid
3100
&& $fdiffpos < [llength $fdiffsneeded]} {
3101
- # git-diff-tree doesn't output anything for a commit
3101
+ # git diff-tree doesn't output anything for a commit
3102
# which doesn't change anything
3103
set nullid [lindex $fdiffsneeded $fdiffpos]
3104
set treediffs($nullid) {}
@@ -3526,7 +3526,7 @@ proc gettree {id} {
3526
catch {unset diffmergeid}
3527
if {![info exists treefilelist($id)]} {
3528
if {![info exists treepending]} {
3529
- if {[catch {set gtf [open [concat | git-ls-tree -r $id] r]}]} {
3529
+ if {[catch {set gtf [open [concat | git ls-tree -r $id] r]}]} {
3530
return
3531
}
3532
set treepending $id
@@ -3574,7 +3574,7 @@ proc showfile {f} {
3574
return
3575
}
3576
set blob [lindex $treeidlist($diffids) $i]
3577
- if {[catch {set bf [open [concat | git-cat-file blob $blob] r]} err]} {
3577
+ if {[catch {set bf [open [concat | git cat-file blob $blob] r]} err]} {
3578
puts "oops, error reading blob $blob: $err"
3579
return
3580
}
@@ -3616,7 +3616,7 @@ proc mergediff {id l} {
3616
set diffids $id
3617
# this doesn't seem to actually affect anything...
3618
set env(GIT_DIFF_OPTS) $diffopts
3619
- set cmd [concat | git-diff-tree --no-commit-id --cc $id]
3619
+ set cmd [concat | git diff-tree --no-commit-id --cc $id]
3620
if {[catch {set mdf [open $cmd r]} err]} {
3621
error_popup "Error getting merge diffs: $err"
3622
return
@@ -3728,7 +3728,7 @@ proc gettreediffs {ids} {
3728
set treepending $ids
3729
set treediff {}
3730
if {[catch \
3731
- {set gdtf [open [concat | git-diff-tree --no-commit-id -r $ids] r]} \
3731
+ {set gdtf [open [concat | git diff-tree --no-commit-id -r $ids] r]} \
3732
]} return
3733
fconfigure $gdtf -blocking 0
3734
fileevent $gdtf readable [list gettreediffline $gdtf $ids]
@@ -3764,7 +3764,7 @@ proc getblobdiffs {ids} {
3764
global nextupdate diffinhdr treediffs
3765
3766
set env(GIT_DIFF_OPTS) $diffopts
3767
- set cmd [concat | git-diff-tree --no-commit-id -r -p -C $ids]
3767
+ set cmd [concat | git diff-tree --no-commit-id -r -p -C $ids]
3768
if {[catch {set bdf [open $cmd r]} err]} {
3769
puts "error getting diffs: $err"
3770
return
@@ -4301,7 +4301,7 @@ proc mkpatchgo {} {
4301
set oldid [$patchtop.fromsha1 get]
4302
set newid [$patchtop.tosha1 get]
4303
set fname [$patchtop.fname get]
4304
- if {[catch {exec git-diff-tree -p $oldid $newid >$fname &} err]} {
4304
+ if {[catch {exec git diff-tree -p $oldid $newid >$fname &} err]} {
4305
error_popup "Error creating patch: $err"
4306
}
4307
catch {destroy $patchtop}
@@ -4868,11 +4868,11 @@ proc tcl_encoding {enc} {
4868
# defaults...
4869
set datemode 0
4870
set diffopts "-U 5 -p"
4871
-set wrcomcmd "git-diff-tree --stdin -p --pretty"
4871
+set wrcomcmd "git diff-tree --stdin -p --pretty"
4872
4873
set gitencoding {}
4874
catch {
4875
- set gitencoding [exec git-repo-config --get i18n.commitencoding]
4875
+ set gitencoding [exec git repo-config --get i18n.commitencoding]
4876
}
4877
if {$gitencoding == ""} {
4878
set gitencoding "utf-8"
@@ -4928,7 +4928,7 @@ if {$i >= 0} {
4928
set revtreeargs [lrange $revtreeargs 0 [expr {$i - 1}]]
4929
} elseif {$revtreeargs ne {}} {
4930
if {[catch {
4931
- set f [eval exec git-rev-parse --no-revs --no-flags $revtreeargs]
4931
+ set f [eval exec git rev-parse --no-revs --no-flags $revtreeargs]
4932
set cmdline_files [split $f "\n"]
4933
set n [llength $cmdline_files]
4934
set revtreeargs [lrange $revtreeargs 0 end-$n]