Skip to contentSkip to conversation

Use git-rev-parse --git-dir to determine GIT_DIR

PATCH New Peter Baumann 1 participant 1 message Aug 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use git-rev-parse --git-dir to determine GIT_DIR

---
 gitk |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
gitk +1 -6
index ab383b3..60f8212 100755
@@ -8,12 +8,7 @@ exec wish "$0" -- "$@"
 # either version 2, or (at your option) any later version.
 
 proc gitdir {} {
-    global env
-    if {[info exists env(GIT_DIR)]} {
-	return $env(GIT_DIR)
-    } else {
-	return ".git"
-    }
+    return [exec git rev-parse --git-dir]
 }
 
 proc start_rev_list {view} {
Signature · 1 line
1.4.3.3