[PATCH v3 05/19] delete_refs(): make error message more generic
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Jun 22, 2015, 14:02 UTC
- Message-ID
- <feb52672f14a4c664478ac65664c3bfd6405e3a8.1434980615.git.mhagger@alum.mit.edu>
- In-Reply-To
- <cover.1434980615.git.mhagger@alum.mit.edu>
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> --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c b/refs.c index 6f62bd1..5386077 100644 --- a/refs.c +++ b/refs.c @@ -2831,7 +2831,7 @@ int delete_refs(struct string_list *refnames) const char *refname = refnames->items[i].string; if (delete_ref(refname, NULL, 0)) - result |= error(_("Could not remove branch %s"), refname); + result |= error(_("could not remove reference %s"), refname); } return result;
-- 2.1.4