list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH] gitk: automatically cd to $GIT_PREFIX
@ 2021-05-05 21:18 Felipe Contreras
  0 siblings, 0 replies; only message in thread
From: Felipe Contreras @ 2021-05-05 21:18 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras, Denton Liu, Felipe Contreras

If gitk is ran as a shell alias it cannot find specified files in the
command line if ran in a subdir (because it's ran in the top-level

  cd Documentation/
  git -c 'alias.test=!gitk' test -- config.txt

The simplest way to fix this is to automatically cd to the specified
$GIT_PREFIX in the environment.

Signed-off-by: Felipe Contreras <>
 gitk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gitk b/gitk
index 23d9dd1..c7c6989 100755
--- a/gitk
+++ b/gitk
@@ -12505,6 +12505,10 @@ if {[catch {set gitdir [exec git rev-parse --git-dir]}]} {
     exit 1
+if {[info exists env(GIT_PREFIX)] && $env(GIT_PREFIX) ne ""} {
+    cd $env(GIT_PREFIX)
 set selecthead {}
 set selectheadid {}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-05 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 21:18 [PATCH] gitk: automatically cd to $GIT_PREFIX Felipe Contreras list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ \
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for project(s) associated with this inbox:

AGPL code for this site: git clone