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

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

From
JSJörg Sommer <joerg@alea.gnuu.de>
Date
May 5, 2008, 00:09 UTC
Message-ID
<1209946178-29398-1-git-send-email-joerg@alea.gnuu.de>
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
Next: Johannes Schindelin
Message 1 of 8 in “Pay attention to GIT_DIR when searching the git directory”
  1. Pay attention to GIT_DIR when searching the git directoryJörg Sommer, May 5, 2008
  2. Johannes SchindelinMay 5, 2008
  3. Jörg SommerMay 5, 2008
  4. Johannes SchindelinMay 5, 2008
  5. Jakub NarebskiMay 5, 2008
  6. Jörg SommerMay 5, 2008
  7. Johannes SchindelinMay 5, 2008
  8. Jakub NarebskiMay 5, 2008

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.