summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/refs.c b/src/refs.c
index 9dc422e1b..1d73b2677 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1357,8 +1357,8 @@ int git_reference_rename(git_reference *ref, const char *new_name, int force)
normalization_flags) < 0)
return -1;
- if (reference_can_write(ref->owner, normalized, ref->name, force) < 0)
- return -1;
+ if ((result = reference_can_write(ref->owner, normalized, ref->name, force)) < 0)
+ return result;
/* Initialize path now so we won't get an allocation failure once
* we actually start removing things. */