diff options
author | Jeff King <peff@peff.net> | 2015-05-21 00:45:32 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-21 11:07:46 -0700 |
commit | 3a429d0af342d85ef6d561e3a60ae8793a34ae78 (patch) | |
tree | b3571b0a39fa421440f5ff862ef4f8b270fb9bc8 /builtin/for-each-ref.c | |
parent | remote.c: introduce branch_get_upstream helper (diff) | |
download | tgif-3a429d0af342d85ef6d561e3a60ae8793a34ae78.tar.xz |
remote.c: report specific errors from branch_get_upstream
When the previous commit introduced the branch_get_upstream
helper, there was one call-site that could not be converted:
the one in sha1_name.c, which gives detailed error messages
for each possible failure.
Let's teach the helper to optionally report these specific
errors. This lets us convert another callsite, and means we
can use the helper in other locations that want to give the
same error messages.
The logic and error messages come straight from sha1_name.c,
with the exception that we start each error with a lowercase
letter, as is our usual style (note that a few tests need
updated as a result).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/for-each-ref.c')
-rw-r--r-- | builtin/for-each-ref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index dc2a201a45..18d209bc9a 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -664,7 +664,7 @@ static void populate_value(struct refinfo *ref) continue; branch = branch_get(ref->refname + 11); - refname = branch_get_upstream(branch); + refname = branch_get_upstream(branch, NULL); if (!refname) continue; } else if (starts_with(name, "color:")) { |