delete_refs(): make error message more generic
Change the error message from Could not remove branch %s to could not remove reference %s First of all, the old error message referred to "branch refs/remotes/origin/foo", which was awkward even for the existing caller. Normally we would refer to a reference like that as either "remote-tracking branch origin/foo" or "reference refs/remotes/origin/foo". Here I take the lazier alternative. Moreover, now that this function is part of the refs API, it might be called for refs that are neither branches nor remote-tracking branches. While we're at it, convert the error message to lower case, as per our usual convention. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Jun 22, 2015 at 16:02 UTC
5d97861b9baf3b0596f2a1c343634062aec2df84
1 file changed
+1
-1
refs.c
+1
-1
@@ -2843,7 +2843,7 @@ int delete_refs(struct string_list *refnames)
2843
const char *refname = refnames->items[i].string;
2844
2845
if (delete_ref(refname, NULL, 0))
2846
- result |= error(_("Could not remove branch %s"), refname);
2846
+ result |= error(_("could not remove reference %s"), refname);
2847
}
2848
2849
return result;