[PATCH] Pay attention to GIT_DIR when searching the git directory

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jörg Sommer
Date: Sunday, May 4, 2008 - 5:09 pm

Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
---
 contrib/hooks/setgitperms.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl
index dab7c8e..0b1bcf2 100644
--- a/contrib/hooks/setgitperms.perl
+++ b/contrib/hooks/setgitperms.perl
@@ -51,7 +51,7 @@ if ((@ARGV < 0) || !GetOptions(
 die $usage unless ($read_mode xor $write_mode);
 
 my $topdir = `git-rev-parse --show-cdup` or die "\n"; chomp $topdir;
-my $gitdir = $topdir . '.git';
+my $gitdir = $ENV{GIT_DIR} || $topdir . '.git';
 my $gitmeta = $topdir . '.gitmeta';
 
 if ($write_mode) {
-- 
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Pay attention to GIT_DIR when searching the git di ..., Jörg Sommer, (Sun May 4, 5:09 pm)
Re: [PATCH] Pay attention to GIT_DIR when searching the gi ..., Johannes Schindelin, (Mon May 5, 4:36 am)
Re: [PATCH] Pay attention to GIT_DIR when searching the gi ..., Johannes Schindelin, (Mon May 5, 6:39 am)
Re: [PATCH] Pay attention to GIT_DIR when searching the gi ..., Johannes Schindelin, (Mon May 5, 9:33 am)