diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2017-01-06 19:22:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-08 06:30:09 +0300 |
commit | e5007a6820e509c2b8611874dc758e4cfe9fabec (patch) | |
tree | 349bc71321901e39b99e0d0407e45cc751cabdd1 /refs | |
parent | 177978f56ad4723fa9dba05fe724f397a2887ca8 (diff) |
lock_ref_sha1_basic(): inline constant
`lflags` is set a single time then never changed, so just inline it.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r-- | refs/files-backend.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index be4ffdca24..7d4658aa94 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2000,7 +2000,6 @@ static struct ref_lock *lock_ref_sha1_basic(struct files_ref_store *refs, struct strbuf ref_file = STRBUF_INIT; struct ref_lock *lock; int last_errno = 0; - int lflags = LOCK_NO_DEREF; int mustexist = (old_sha1 && !is_null_sha1(old_sha1)); int resolve_flags = RESOLVE_REF_NO_RECURSE; int attempts_remaining = 3; @@ -2083,7 +2082,7 @@ static struct ref_lock *lock_ref_sha1_basic(struct files_ref_store *refs, goto error_return; } - if (hold_lock_file_for_update(lock->lk, ref_file.buf, lflags) < 0) { + if (hold_lock_file_for_update(lock->lk, ref_file.buf, LOCK_NO_DEREF) < 0) { last_errno = errno; if (errno == ENOENT && --attempts_remaining > 0) /* |