summaryrefslogtreecommitdiff
path: root/src/reflog.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-05-01 15:08:12 -0700
committerRussell Belfer <rb@github.com>2013-05-01 15:08:12 -0700
commit41e93563e7462bd37cf3a09b8aaac35736046482 (patch)
treec3d0a67ac9f3607a46147c94895247c655002306 /src/reflog.c
parent62caf3f38fa25537b5f824329d8f88875ee837f2 (diff)
downloadlibgit2-41e93563e7462bd37cf3a09b8aaac35736046482.tar.gz
Error messages for a couple other boundary conditions
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);