Code

glossary: stop generating automatically
[git.git] / refs.c
diff --git a/refs.c b/refs.c
index 9e3dfb3c974c893760a6bcb75ecc39026f74a23b..131e87014987c0660af6ecdb3c62ef81c1270a25 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -921,6 +921,8 @@ static int log_ref_write(const char *ref_name, const unsigned char *old_sha1,
                                     log_file, strerror(errno));
        }
 
+       adjust_shared_perm(log_file);
+
        msglen = 0;
        if (msg) {
                /* clean up the message and make sure it is a single line */
@@ -1042,7 +1044,9 @@ int create_symref(const char *ref_target, const char *refs_heads_master,
                return -1;
        }
 
+#ifndef NO_SYMLINK_HEAD
        done:
+#endif
        if (logmsg && !read_ref(refs_heads_master, new_sha1))
                log_ref_write(ref_target, old_sha1, new_sha1, logmsg);
 
@@ -1251,7 +1255,7 @@ static int do_for_each_reflog(const char *base, each_ref_fn fn, void *cb_data)
                free(log);
                closedir(dir);
        }
-       else
+       else if (*base)
                return errno;
        return retval;
 }