diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-11-06 10:52:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-11-06 10:52:32 -0800 |
commit | a1671dd82b5e1c6e837a3f47509a3a33189b0884 (patch) | |
tree | 7481de8581bc9b94b6059333009e4c155a75dd99 /refs.c | |
parent | Merge branch 'rs/use-child-process-init-more' (diff) | |
parent | ignore stale directories when checking reflog existence (diff) | |
download | tgif-a1671dd82b5e1c6e837a3f47509a3a33189b0884.tar.xz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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'", |