Subject: [PATCH v2 0/2] Fix for git checkout @{u} (non-local) then git status

From: Jonathan Tan <[email-masked]>
Date: Fri, 28 Aug 2020 18:02:25 -0700

As Jonathan Nieder wrote [1]:

>  A. Like you're hinting, could dwim_ref get a variant that returns -1
>     instead of die()ing on failure?  That way, we could fulfill the
>     intent described in b397ea48:
> 
> 	When it cannot figure out the original ref, it shows an abbreviated
> 	SHA-1.

Here are some patches that do this. As discussed, this is not the
complete solution, but at least now we can handle unresolvable marks.

I've also switched the commit messages and test from mentioning "git
branch" to mentioning "git status".

[1] https://lore.kernel.org/git/[email-masked]/

Jonathan Tan (2):
  sha1-name: replace unsigned int with option struct
  wt-status: tolerate dangling marks

 cache.h           | 27 +++++++++++++++++++--------
 refs.c            | 17 +++++++++++------
 refs.h            |  3 ++-
 revision.c        |  3 ++-
 sha1-name.c       | 45 +++++++++++++++++++++++++++++----------------
 t/t7508-status.sh | 12 ++++++++++++
 wt-status.c       |  2 +-
 7 files changed, 76 insertions(+), 33 deletions(-)

-- 
2.28.0.402.g5ffc5be6b7-goog