Skip to content

Commit

Permalink
setup_git_directory_gently: do not barf when GIT_DIR is given.
Browse files Browse the repository at this point in the history
Earlier we barfed when GIT_DIR environment variable points at a
directory yet to be created, which made it impossible to use
configuration mechanism in "git-init-db".

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Matthias Lederhofer authored and Junio C Hamano committed Jul 31, 2006
1 parent ca7a741 commit 41e95f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ const char *setup_git_directory_gently(int *nongit_ok)
}
return NULL;
bad_dir_environ:
if (!nongit_ok) {
*nongit_ok = 1;
return NULL;
}
path[len] = 0;
die("Not a git repository: '%s'", path);
}
Expand Down

0 comments on commit 41e95f6

Please sign in to comment.