summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-11-06 10:52:31 -0800
committerJunio C Hamano <gitster@pobox.com>2014-11-06 10:52:32 -0800
commita1671dd82b5e1c6e837a3f47509a3a33189b0884 (patch)
tree7481de8581bc9b94b6059333009e4c155a75dd99 /refs.c
parent6b55f8b54601c6e6319566875b104d333930bc76 (diff)
parent9233887cce8eaebd8469315622b84bd26910351f (diff)
downloadgit-a1671dd82b5e1c6e837a3f47509a3a33189b0884.tar.gz
Merge branch 'jk/fetch-reflog-df-conflict'
Corner-case bugfixes for "git fetch" around reflog handling. * jk/fetch-reflog-df-conflict: ignore stale directories when checking reflog existence fetch: load all default config at startup
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 0368ed461f..5ff457ebfc 100644
--- a/refs.c
+++ b/refs.c
@@ -2962,10 +2962,10 @@ int log_ref_setup(const char *refname, char *logfile, int bufsize)
logfd = open(logfile, oflags, 0666);
if (logfd < 0) {
- if (!(oflags & O_CREAT) && errno == ENOENT)
+ if (!(oflags & O_CREAT) && (errno == ENOENT || errno == EISDIR))
return 0;
- if ((oflags & O_CREAT) && errno == EISDIR) {
+ if (errno == EISDIR) {
if (remove_empty_directories(logfile)) {
int save_errno = errno;
error("There are still logs under '%s'",