diff options
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c index e2d576ad7b..361708b7bb 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -865,7 +865,12 @@ int interpret_branch_name(const char *name, struct strbuf *buf) if (!upstream->merge || !upstream->merge[0]->dst) { if (!ref_exists(upstream->refname)) return error("No such branch: '%s'", cp); - return error("No upstream branch found for '%s'", upstream->name); + if (!upstream->merge) + return error("No upstream configured for branch '%s'", + upstream->name); + return error( + "Upstream branch '%s' not stored as a remote-tracking branch", + upstream->merge[0]->src); } free(cp); cp = shorten_unambiguous_ref(upstream->merge[0]->dst, 0); |