summaryrefslogtreecommitdiff
path: root/builtin/show-branch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-09 20:53:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-09 20:53:09 (GMT)
commit0df670bc0b8b5499859829ba0889ce96a75304a6 (patch)
treee95738e380852775d16806643a57ece2d4d39461 /builtin/show-branch.c
parent7364aee138326303371c1a17d3259912366c1b55 (diff)
parentf24c30e0b6b13078d8fc7cd71b9989d28fd76610 (diff)
downloadgit-0df670bc0b8b5499859829ba0889ce96a75304a6.zip
git-0df670bc0b8b5499859829ba0889ce96a75304a6.tar.gz
git-0df670bc0b8b5499859829ba0889ce96a75304a6.tar.bz2
Merge branch 'jt/interpret-branch-name-fallback'
"git status" has trouble showing where it came from by interpreting reflog entries that recordcertain events, e.g. "checkout @{u}", and gives a hard/fatal error. Even though it inherently is impossible to give a correct answer because the reflog entries lose some information (e.g. "@{u}" does not record what branch the user was on hence which branch 'the upstream' needs to be computed, and even if the record were available, the relationship between branches may have changed), at least hide the error to allow "status" show its output. * jt/interpret-branch-name-fallback: wt-status: tolerate dangling marks refs: move dwim_ref() to header file sha1-name: replace unsigned int with option struct
Diffstat (limited to 'builtin/show-branch.c')
-rw-r--r--builtin/show-branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 7eae5f3..d6d2dab 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -741,7 +741,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
die(Q_("only %d entry can be shown at one time.",
"only %d entries can be shown at one time.",
MAX_REVS), MAX_REVS);
- if (!dwim_ref(*av, strlen(*av), &oid, &ref))
+ if (!dwim_ref(*av, strlen(*av), &oid, &ref, 0))
die(_("no such ref %s"), *av);
/* Has the base been specified? */