diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-09 13:53:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-09 13:53:09 -0700 |
commit | 0df670bc0b8b5499859829ba0889ce96a75304a6 (patch) | |
tree | e95738e380852775d16806643a57ece2d4d39461 /builtin/log.c | |
parent | Merge branch 'js/ci-squelch-false-failure' (diff) | |
parent | wt-status: tolerate dangling marks (diff) | |
download | tgif-0df670bc0b8b5499859829ba0889ce96a75304a6.tar.xz |
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/log.c')
-rw-r--r-- | builtin/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c index b58f8da09e..4ec7f57cf4 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1061,7 +1061,7 @@ static char *find_branch_name(struct rev_info *rev) return NULL; ref = rev->cmdline.rev[positive].name; tip_oid = &rev->cmdline.rev[positive].item->oid; - if (dwim_ref(ref, strlen(ref), &branch_oid, &full_ref) && + if (dwim_ref(ref, strlen(ref), &branch_oid, &full_ref, 0) && skip_prefix(full_ref, "refs/heads/", &v) && oideq(tip_oid, &branch_oid)) branch = xstrdup(v); |