git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk errors out if launched in a subdirectory

From
PBPeter Baumann <siprbaum@stud.informatik.uni-erlangen.de>
Date
Jan 9, 2007, 14:30 UTC
Message-ID
<20070109143019.GA24688@xp.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
Next: Peter Baumann
Message 1 of 5 in “gitk errors out if launched in a subdirectory”
  1. gitk errors out if launched in a subdirectoryPeter Baumann, Jan 9, 2007
  2. Peter BaumannJan 12, 2007
  3. Junio C HamanoJan 12, 2007
  4. Paul MackerrasJan 13, 2007
  5. Peter BaumannJan 13, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.