mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 09:18:48 +00:00
Error messages for a couple other boundary conditions
This commit is contained in:
parent
62caf3f38f
commit
41e93563e7
@ -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);
|
||||
|
||||
|
@ -844,8 +844,10 @@ static int reference__update_terminal(
|
||||
git_reference *ref;
|
||||
int error = 0;
|
||||
|
||||
if (nesting > MAX_NESTING_LEVEL)
|
||||
if (nesting > MAX_NESTING_LEVEL) {
|
||||
giterr_set(GITERR_REFERENCE, "Reference chain too deep (%d)", nesting);
|
||||
return GIT_ENOTFOUND;
|
||||
}
|
||||
|
||||
error = git_reference_lookup(&ref, repo, ref_name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user