Makefile: add missing phony target
[gitweb.git] / credential-store.c
index f6925096ffa7e036b4e63f65ce372c596c9e1b70..fc67d16c10882bf543bd521d2f6dfee8d3c4d213 100644 (file)
@@ -52,7 +52,7 @@ static void print_entry(struct credential *c)
 static void print_line(struct strbuf *buf)
 {
        strbuf_addch(buf, '\n');
-       write_or_die(credential_lock.fd, buf->buf, buf->len);
+       write_or_die(get_lock_file_fd(&credential_lock), buf->buf, buf->len);
 }
 
 static void rewrite_credential_file(const char *fn, struct credential *c,
@@ -64,7 +64,8 @@ static void rewrite_credential_file(const char *fn, struct credential *c,
                print_line(extra);
        parse_credential_file(fn, c, NULL, print_line);
        if (commit_lock_file(&credential_lock) < 0)
-               die_errno("unable to commit credential store");
+               die_errno("unable to write credential store: %s",
+                         strerror(errno));
 }
 
 static void store_credential_file(const char *fn, struct credential *c)