From: Jonathan Tan <jonathantanmy@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>,
gitster@pobox.com, jrnieder@gmail.com
Subject: [PATCH v2 0/2] Fix for git checkout @{u} (non-local) then git status
Date: Fri, 28 Aug 2020 18:02:25 -0700 [thread overview]
Message-ID: <cover.1598662525.git.jonathantanmy@google.com> (raw)
In-Reply-To: <20200513004058.34456-1-jonathantanmy@google.com>
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/20200827014723.GA750502@google.com/
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
next prev parent reply other threads:[~2020-08-29 1:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 0:40 [PATCH] wt-status: expand, not dwim, a "detached from" ref Jonathan Tan
2020-05-13 5:33 ` Junio C Hamano
2020-05-13 14:59 ` Junio C Hamano
2020-05-18 22:24 ` Jonathan Tan
2020-08-27 1:47 ` Jonathan Nieder
2020-08-27 2:10 ` Junio C Hamano
2020-08-29 1:02 ` Jonathan Tan [this message]
2020-08-29 1:02 ` [PATCH v2 1/2] sha1-name: replace unsigned int with option struct Jonathan Tan
2020-08-29 18:44 ` Junio C Hamano
2020-08-29 1:02 ` [PATCH v2 2/2] wt-status: tolerate dangling marks Jonathan Tan
2020-08-29 18:55 ` Junio C Hamano
2020-08-31 17:17 ` Jonathan Tan
2020-08-31 17:37 ` Junio C Hamano
2020-09-01 22:28 ` [PATCH v3 0/3] Fix for git checkout @{u} (non-local) then git status Jonathan Tan
2020-09-01 22:28 ` [PATCH v3 1/3] sha1-name: replace unsigned int with option struct Jonathan Tan
2020-09-01 22:28 ` [PATCH v3 2/3] refs: move dwim_ref() to header file Jonathan Tan
2020-09-01 22:28 ` [PATCH v3 3/3] wt-status: tolerate dangling marks Jonathan Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1598662525.git.jonathantanmy@google.com \
--to=jonathantanmy@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).