summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/setup.c b/setup.c
index 2ae57f7..cc97f9f 100644
--- a/setup.c
+++ b/setup.c
@@ -138,7 +138,8 @@ const char **get_pathspec(const char *prefix, const char **pathspec)
* GIT_OBJECT_DIRECTORY environment variable
* - a refs/ directory
* - either a HEAD symlink or a HEAD file that is formatted as
- * a proper "ref:".
+ * a proper "ref:", or a regular file HEAD that has a properly
+ * formatted sha1 object name.
*/
static int is_git_directory(const char *suspect)
{
@@ -161,7 +162,7 @@ static int is_git_directory(const char *suspect)
return 0;
strcpy(path + len, "/HEAD");
- if (validate_symref(path))
+ if (validate_headref(path))
return 0;
return 1;