From b523194d219a9dc062bad89bf8ba5dbeca7dab17 Mon Sep 17 00:00:00 2001 From: Adrien Thebo Date: Wed, 4 Mar 2015 13:29:13 -0800 Subject: [PATCH] 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. --- src/refspec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/refspec.c b/src/refspec.c index a56c44cc0..ad8141248 100644 --- a/src/refspec.c +++ b/src/refspec.c @@ -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; }