* [PATCH] [GITK] use "git <command>" instead of "git-<command>"
@ 2006-01-25 7:56 Uwe Zeisberger
2006-01-25 9:52 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Uwe Zeisberger @ 2006-01-25 7:56 UTC (permalink / raw)
To: git
Otherwise gitk is not able to work with installations using a gitexecdir
different from bindir.
Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
---
gitk | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
05f2a8c2fb8811bb78dd3c81c204e8635ca0fd83
diff --git a/gitk b/gitk
index f12b3ce..6aa340d 100755
--- a/gitk
+++ b/gitk
@@ -21,7 +21,7 @@ proc parse_args {rargs} {
if [catch {
set parse_args [concat --default HEAD $rargs]
- set parsed_args [split [eval exec git-rev-parse $parse_args] "\n"]
+ set parsed_args [split [eval exec git rev-parse $parse_args] "\n"]
}] {
# if git-rev-parse failed for some reason...
if {$rargs == {}} {
@@ -40,7 +40,7 @@ proc start_rev_list {rlargs} {
set nextupdate [expr {$startmsecs + 100}]
set ncmupdate 1
if [catch {
- set commfd [open [concat | git-rev-list --header --topo-order \
+ set commfd [open [concat | git rev-list --header --topo-order \
--parents $rlargs] r]
} err] {
puts stderr "Error executing git-rev-list: $err"
@@ -181,7 +181,7 @@ proc doupdate {reading} {
}
proc readcommit {id} {
- if [catch {set contents [exec git-cat-file commit $id]}] return
+ if [catch {set contents [exec git cat-file commit $id]}] return
parsecommit $id $contents 0 {}
}
@@ -242,7 +242,7 @@ proc updatecommits {rargs} {
set phase updatecommits
set oldcommits $commits
set commits {}
- set removed_commits [split [eval exec git-rev-list $ignorenew] "\n" ]
+ set removed_commits [split [eval exec git rev-list $ignorenew] "\n" ]
if {[llength $removed_commits] > 0} {
allcanvs delete all
foreach c $removed_commits {
@@ -359,7 +359,7 @@ proc readrefs {} {
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
catch {unset $v}
}
- set refd [open [list | git-ls-remote [gitdir]] r]
+ set refd [open [list | git ls-remote [gitdir]] r]
while {0 <= [set n [gets $refd line]]} {
if {![regexp {^([0-9a-f]{40}) refs/([^^]*)$} $line \
match id path]} {
@@ -376,14 +376,14 @@ proc readrefs {} {
set type {}
set tag {}
catch {
- set commit [exec git-rev-parse "$id^0"]
+ set commit [exec git rev-parse "$id^0"]
if {"$commit" != "$id"} {
set tagids($name) $commit
lappend idtags($commit) $name
}
}
catch {
- set tagcontents($name) [exec git-cat-file tag "$id"]
+ set tagcontents($name) [exec git cat-file tag "$id"]
}
} elseif { $type == "heads" } {
set headids($name) $id
@@ -1855,7 +1855,7 @@ proc findpatches {} {
}
if {[catch {
- set f [open [list | git-diff-tree --stdin -s -r -S$findstring \
+ set f [open [list | git diff-tree --stdin -s -r -S$findstring \
<< $inputids] r]
} err]} {
error_popup "Error starting search process: $err"
@@ -1958,7 +1958,7 @@ proc findfiles {} {
# start off a git-diff-tree process if needed
if {$diffsneeded ne {}} {
if {[catch {
- set df [open [list | git-diff-tree -r --stdin << $diffsneeded] r]
+ set df [open [list | git diff-tree -r --stdin << $diffsneeded] r]
} err ]} {
error_popup "Error starting search process: $err"
return
@@ -2382,7 +2382,7 @@ proc findgca {ids} {
set gca $id
} else {
if {[catch {
- set gca [exec git-merge-base $gca $id]
+ set gca [exec git merge-base $gca $id]
} err]} {
return {}
}
@@ -2470,7 +2470,7 @@ proc showmergediff {} {
catch {unset grouphunks}
set groupfilelast -1
foreach p $parents($diffmergeid) {
- set cmd [list | git-diff-tree -p $p $diffmergeid]
+ set cmd [list | git diff-tree -p $p $diffmergeid]
set cmd [concat $cmd $mergefilelist($diffmergeid)]
if {[catch {set f [open $cmd r]} err]} {
error_popup "Error getting diffs: $err"
@@ -2912,7 +2912,7 @@ proc gettreediffs {ids} {
global treediff parents treepending
set treepending $ids
set treediff {}
- if [catch {set gdtf [open [concat | git-diff-tree --no-commit-id -r $ids] r]}] return
+ if [catch {set gdtf [open [concat | git diff-tree --no-commit-id -r $ids] r]}] return
fconfigure $gdtf -blocking 0
fileevent $gdtf readable [list gettreediffline $gdtf $ids]
}
@@ -2946,7 +2946,7 @@ proc getblobdiffs {ids} {
global difffilestart nextupdate diffinhdr treediffs
set env(GIT_DIFF_OPTS) $diffopts
- set cmd [concat | git-diff-tree --no-commit-id -r -p -C $ids]
+ set cmd [concat | git diff-tree --no-commit-id -r -p -C $ids]
if {[catch {set bdf [open $cmd r]} err]} {
puts "error getting diffs: $err"
return
@@ -3524,7 +3524,7 @@ proc mkpatchgo {} {
set oldid [$patchtop.fromsha1 get]
set newid [$patchtop.tosha1 get]
set fname [$patchtop.fname get]
- if {[catch {exec git-diff-tree -p $oldid $newid >$fname &} err]} {
+ if {[catch {exec git diff-tree -p $oldid $newid >$fname &} err]} {
error_popup "Error creating patch: $err"
}
catch {destroy $patchtop}
@@ -4090,11 +4090,11 @@ proc tcl_encoding {enc} {
# defaults...
set datemode 0
set diffopts "-U 5 -p"
-set wrcomcmd "git-diff-tree --stdin -p --pretty"
+set wrcomcmd "git diff-tree --stdin -p --pretty"
set gitencoding {}
catch {
- set gitencoding [exec git-repo-config --get i18n.commitencoding]
+ set gitencoding [exec git repo-config --get i18n.commitencoding]
}
if {$gitencoding == ""} {
set gitencoding "utf-8"
--
1.1.4.g2eaa
--
Uwe Zeisberger
dd if=/proc/self/exe bs=1 skip=1 count=3 2>/dev/null
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [GITK] use "git <command>" instead of "git-<command>"
2006-01-25 7:56 [PATCH] [GITK] use "git <command>" instead of "git-<command>" Uwe Zeisberger
@ 2006-01-25 9:52 ` Junio C Hamano
2006-01-26 14:26 ` Uwe Zeisberger
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-01-25 9:52 UTC (permalink / raw)
To: Uwe Zeisberger; +Cc: git
Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:
> Otherwise gitk is not able to work with installations using a gitexecdir
> different from bindir.
For something like gitk that lives for some time and spawns git
number of times, it is considered a good practice to:
(1) Run "git --exec-path" at the beginning, to learn
GIT_EXEC_PATH;
(2) Prepend that to PATH;
(3) And invoke "git-foo" commands in the rest of the script.
This saves an extra fork/exec (gitk -> git -> git-foo). I was
told qgit already does this.
Note that we may end up leaving some git-* commands in /usr/bin
while moving the rest to elsewhere (e.g. /usr/lib/git-core/exec/),
so (2) and (3) cannot be safely substituted with
(BAD) invoke "$GIT_EXEC_PATH/git-foo" instead.
I usually prefer patches to gitk to come through paulus, so
please CC: when sending patches to gitk ("git whatchanged gitk"
would give you the e-mail address).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [GITK] use "git <command>" instead of "git-<command>"
2006-01-25 9:52 ` Junio C Hamano
@ 2006-01-26 14:26 ` Uwe Zeisberger
0 siblings, 0 replies; 3+ messages in thread
From: Uwe Zeisberger @ 2006-01-26 14:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
> Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:
>
> > Otherwise gitk is not able to work with installations using a gitexecdir
> > different from bindir.
>
> For something like gitk that lives for some time and spawns git
> number of times, it is considered a good practice to:
>
> (1) Run "git --exec-path" at the beginning, to learn
> GIT_EXEC_PATH;
> (2) Prepend that to PATH;
> (3) And invoke "git-foo" commands in the rest of the script.
(I remember darkly that was already discussed, but I cannot find the
thread ATM.)
Just to get the patch right:
If
- PATH=$(HOME)/bin:/usr/bin
- GIT_EXEC_PATH=/usr/bin
then gitk should use
PATH=/usr/bin:$(HOME)/bin:/usr/bin
to call git-<command> and
PATH=$(HOME)/bin:/usr/bin
to call the rest, right?
Best regards
Uwe
--
Uwe Zeisberger
fib where fib = 0 : 1 : zipWith (+) fib (tail fib)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-01-26 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-25 7:56 [PATCH] [GITK] use "git <command>" instead of "git-<command>" Uwe Zeisberger
2006-01-25 9:52 ` Junio C Hamano
2006-01-26 14:26 ` Uwe Zeisberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).