[PATCH] git-sh-setup: Fail if the git directory was not found.

From: Robert Shearman <rob@codeweavers.com>
Date: 2006-08-11 19:23:30
Always use git-rev-parse to find a valid git directory, as 
git-repo-config no longer returns an error code if a git directory 
wasn't found.

This fixes the message received when invoking certain commands 
implemented as shell scripts from outside of a git tree, so e.g. instead 
of receiving this:
/home/rob/bin/git-fetch: line 89: /FETCH_HEAD: Permission denied
We get this again:
fatal: Not a git repository: '.git'

Also, move the setting of GIT_OBJECT_DIRECTORY to outside of the 
non-subdir-ok case as it isn't specific to that case.
Signed-off-by: Robert Shearman <rob@codeweavers.com>
---
  git-sh-setup.sh |   12 +++---------
  1 files changed, 3 insertions(+), 9 deletions(-)

Hopefully this patch addresses the concerns of Junio and others by 
continuing to allow git-ls-remotes to work outside of a git repository.

-
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

Received on Fri Aug 11 19:25:55 2006

This archive was generated by hypermail 2.1.8 : 2006-08-11 19:26:25 EST