summaryrefslogtreecommitdiff
path: root/src/reflog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reflog.c')
-rw-r--r--src/reflog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/reflog.c b/src/reflog.c
index 8c133fe53..4cc20d2c7 100644
--- a/src/reflog.c
+++ b/src/reflog.c
@@ -483,8 +483,10 @@ int git_reflog_drop(
entry = (git_reflog_entry *)git_reflog_entry_byindex(reflog, idx);
- if (entry == NULL)
+ if (entry == NULL) {
+ giterr_set(GITERR_REFERENCE, "No reflog entry at index "PRIuZ, idx);
return GIT_ENOTFOUND;
+ }
reflog_entry_free(entry);