mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-05 07:29:21 +00:00
refspec: set err message on invalid refspec
If a refspec could not be parsed, the git_refspec__parse function would return an error value but would not provide additional error information for the callers. This commit amends that function to set a more useful error message.
This commit is contained in:
parent
d7c81945b0
commit
b523194d21
@ -133,6 +133,9 @@ int git_refspec__parse(git_refspec *refspec, const char *input, bool is_fetch)
|
||||
return 0;
|
||||
|
||||
invalid:
|
||||
giterr_set(
|
||||
GITERR_INVALID,
|
||||
"'%s' is not a valid refspec.", input);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user