summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-03-02 09:29:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-05 20:35:36 (GMT)
commit8280bbebd1ecc4633b969a439ed4ca653d1bc958 (patch)
tree0ccd3e867e1e6a57d217d8eaa817744841ba2c29 /refs.c
parent507d6aa5bf2fb9f56d0c7f70d4ff3b8177da9d8e (diff)
downloadgit-8280bbebd1ecc4633b969a439ed4ca653d1bc958.zip
git-8280bbebd1ecc4633b969a439ed4ca653d1bc958.tar.gz
git-8280bbebd1ecc4633b969a439ed4ca653d1bc958.tar.bz2
write_ref_sha1(): remove check for lock == NULL
None of the callers pass NULL to this function, and there doesn't seem to be any usefulness to allowing them to do so. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/refs.c b/refs.c
index c5fa709..d1130e2 100644
--- a/refs.c
+++ b/refs.c
@@ -3080,10 +3080,6 @@ static int write_ref_sha1(struct ref_lock *lock,
static char term = '\n';
struct object *o;
- if (!lock) {
- errno = EINVAL;
- return -1;
- }
if (!lock->force_write && !hashcmp(lock->old_sha1, sha1)) {
unlock_ref(lock);
return 0;