From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Jeff King <peff@peff.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: git-push: forced update of tag shows unabbreviated SHA1
Date: Thu, 31 Jan 2008 01:37:53 -0800 [thread overview]
Message-ID: <7vsl0ecp3i.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <47A1948F.6080308@viscovery.net> (Johannes Sixt's message of "Thu, 31 Jan 2008 10:27:43 +0100")
Johannes Sixt <j.sixt@viscovery.net> writes:
> This is just a cosmetical flaw:
> ...
> To file:///home/jsixt/tmp/foo/B/../A
> + 639669ce44f84417f30842c622064827dda01461...475e55f T -> T (forced update)
>
> Notice that the original SHA1 is not abbreviated.
I suspect that is because you do not _have_ the original object,
so there is no uniquely usable abbreviation to name the object
in your repository.
This obviously is not tested at all (not even compile tested),
but I think it would show you what is going on.
---
builtin-send-pack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index 8afb1d0..9c558ee 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -265,7 +265,7 @@ static const char *status_abbrev(unsigned char sha1[20])
{
const char *abbrev;
abbrev = find_unique_abbrev(sha1, DEFAULT_ABBREV);
- return abbrev ? abbrev : sha1_to_hex(sha1);
+ return abbrev ? abbrev : "<you do not have it>";
}
static void print_ok_ref_status(struct ref *ref)
next prev parent reply other threads:[~2008-01-31 9:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 9:27 git-push: forced update of tag shows unabbreviated SHA1 Johannes Sixt
2008-01-31 9:37 ` Junio C Hamano [this message]
2008-01-31 10:01 ` Johannes Sixt
2008-01-31 10:06 ` Jeff King
2008-01-31 10:21 ` Junio C Hamano
2008-01-31 10:39 ` Jeff King
2008-01-31 10:27 ` Jeff King
2008-01-31 10:38 ` Junio C Hamano
2008-01-31 10:41 ` Jeff King
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=7vsl0ecp3i.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=peff@peff.net \
/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).