summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-07-01 12:02:27 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2015-07-01 12:02:27 -0500
commitbf7d2761d4d9da79c3ae26e94da6a95b27e8769f (patch)
tree9a8a5bd2891d38ee3015af20f659f72da4ef2af8
parent34065968ed3c386b875ee050b8ed34d9968e2d7a (diff)
parent526f91f5525707b2a948e6ff5a59665d92370cab (diff)
downloadlibgit2-bf7d2761d4d9da79c3ae26e94da6a95b27e8769f.tar.gz
Merge pull request #3280 from linquize/8.3
Fix 8.3 filename tests failure when 8.3 is disabled
-rw-r--r--src/repository.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c
index 82d998124..08f4baa20 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -867,7 +867,9 @@ static int reserved_names_add8dot3(git_repository *repo, const char *path)
{
char *name = git_win32_path_8dot3_name(path);
const char *def = GIT_DIR_SHORTNAME;
+ const char *def_dot_git = DOT_GIT;
size_t name_len, def_len = CONST_STRLEN(GIT_DIR_SHORTNAME);
+ size_t def_dot_git_len = CONST_STRLEN(DOT_GIT);
git_buf *buf;
if (!name)
@@ -875,7 +877,8 @@ static int reserved_names_add8dot3(git_repository *repo, const char *path)
name_len = strlen(name);
- if (name_len == def_len && memcmp(name, def, def_len) == 0) {
+ if ((name_len == def_len && memcmp(name, def, def_len) == 0) ||
+ (name_len == def_dot_git_len && memcmp(name, def_dot_git, def_dot_git_len) == 0)) {
git__free(name);
return 0;
}