diff options
Diffstat (limited to 'refs')
-rw-r--r-- | refs/files-backend.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 3d1994debd..180c837d11 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2850,12 +2850,13 @@ static int create_symref_locked(struct ref_lock *lock, const char *refname, return error("unable to fdopen %s: %s", lock->lk->tempfile.filename.buf, strerror(errno)); + update_symref_reflog(lock, refname, target, logmsg); + /* no error check; commit_ref will check ferror */ fprintf(lock->lk->tempfile.fp, "ref: %s\n", target); if (commit_ref(lock) < 0) return error("unable to write symref for %s: %s", refname, strerror(errno)); - update_symref_reflog(lock, refname, target, logmsg); return 0; } |