# [PATCH] gitk errors out if launched in a subdirectory

5 messages from 2007-01-09 to 2007-01-13. Participants: Peter Baumann, Junio C Hamano, Paul Mackerras.
Thread: https://gitlist.dev/t/6307

## Peter Baumann, 2007-01-09 14:30

Subject: [PATCH] gitk errors out if launched in a subdirectory
Message-ID: <20070109143019.GA24688@xp.machine.xx>
URL: https://gitlist.dev/e/20070109143019.GA24688%40xp.machine.xx

```
Make gitk use git-rev-parse --git-dir to find the repository.

Signed-off-by: Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de>
---
 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitk b/gitk
index 3dabc69..ec4f1bd 100755
--- a/gitk
+++ b/gitk
@@ -12,7 +12,7 @@ proc gitdir {} {
     if {[info exists env(GIT_DIR)]} {
 	return $env(GIT_DIR)
     } else {
-	return ".git"
+	return [exec git rev-parse --git-dir]
     }
 }
 
-- 
1.4.4.2

```

## Peter Baumann, 2007-01-12 17:43

Subject: Re: [PATCH] gitk errors out if launched in a subdirectory
Message-ID: <20070112174340.GA6262@xp.machine.xx>
URL: https://gitlist.dev/e/20070112174340.GA6262%40xp.machine.xx
In-Reply-To: <20070109143019.GA24688@xp.machine.xx>

```
Is there something obviously wrong with this patch? It is the second
time I send this (or a slight variant; last time I even removed the
enviroment checking) and nobody answered.

Please say so if it is NAKed.

-Peter


On Tue, Jan 09, 2007 at 03:30:19PM +0100, Peter Baumann wrote:
> Make gitk use git-rev-parse --git-dir to find the repository.
> 
> Signed-off-by: Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de>
> ---
>  gitk |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gitk b/gitk
> index 3dabc69..ec4f1bd 100755
> --- a/gitk
> +++ b/gitk
> @@ -12,7 +12,7 @@ proc gitdir {} {
>      if {[info exists env(GIT_DIR)]} {
>  	return $env(GIT_DIR)
>      } else {
> -	return ".git"
> +	return [exec git rev-parse --git-dir]
>      }
>  }
>  
> -- 
> 1.4.4.2
> 

```

## Junio C Hamano, 2007-01-12 17:59

Subject: Re: [PATCH] gitk errors out if launched in a subdirectory
Message-ID: <7vvejct9bo.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vvejct9bo.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20070112174340.GA6262@xp.machine.xx>

```
Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de> writes:

> Is there something obviously wrong with this patch? It is the second
> time I send this (or a slight variant; last time I even removed the
> enviroment checking) and nobody answered.
>
> Please say so if it is NAKed.

I am Ok with it if Paul is.  I think it makes sense.

```

## Paul Mackerras, 2007-01-13 03:13

Subject: Re: [PATCH] gitk errors out if launched in a subdirectory
Message-ID: <17832.20086.20532.159295@cargo.ozlabs.ibm.com>
URL: https://gitlist.dev/e/17832.20086.20532.159295%40cargo.ozlabs.ibm.com
In-Reply-To: <20070112174340.GA6262@xp.machine.xx>

```
Peter Baumann writes:

> Is there something obviously wrong with this patch? It is the second
> time I send this (or a slight variant; last time I even removed the
> enviroment checking) and nobody answered.
> 
> Please say so if it is NAKed.

No, it looks fine.  It's just that gitk takes a lower priority than
some other things in my life.

Paul.

```

## Peter Baumann, 2007-01-13 16:10

Subject: Re: [PATCH] gitk errors out if launched in a subdirectory
Message-ID: <20070113161057.GA28354@xp.machine.xx>
URL: https://gitlist.dev/e/20070113161057.GA28354%40xp.machine.xx
In-Reply-To: <17832.20086.20532.159295@cargo.ozlabs.ibm.com>

```
On Sat, Jan 13, 2007 at 02:13:58PM +1100, Paul Mackerras wrote:
> Peter Baumann writes:
> 
> > Is there something obviously wrong with this patch? It is the second
> > time I send this (or a slight variant; last time I even removed the
> > enviroment checking) and nobody answered.
> > 
> > Please say so if it is NAKed.
> 
> No, it looks fine.  It's just that gitk takes a lower priority than
> some other things in my life.
> 
> Paul.
> 

Ok. No problem then. I just felt a little bit stupid after posting the
this simple fix the second time and nobody carred.

-Peter

```
