From: Junio C Hamano <gitster@pobox.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org, Jakub Narebski <jnareb@gmail.com>
Subject: Re: [PATCH] Produce a nicer output in case of sha1_object_info failures in ls-tree -l
Date: Thu, 19 Mar 2009 15:13:10 -0700 [thread overview]
Message-ID: <7vmybh6u15.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090319220020.GA8433@blimp.localdomain> (Alex Riesen's message of "Thu, 19 Mar 2009 23:00:21 +0100")
Alex Riesen <raa.lkml@gmail.com> writes:
> Junio C Hamano, Thu, Mar 19, 2009 22:55:56 +0100:
>> Alex Riesen <raa.lkml@gmail.com> writes:
>> > @@ -91,6 +90,7 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
>> > if (!(ls_options & LS_NAME_ONLY)) {
>> > if (ls_options & LS_SHOW_SIZE) {
>> > if (!strcmp(type, blob_type)) {
>> > + unsigned long size = 0;
>> > sha1_object_info(sha1, &size);
>> > printf("%06o %s %s %7lu\t", mode, type,
>> > abbrev ? find_unique_abbrev(sha1, abbrev)
>>
>> Hmm, shouldn't you be checking the return value from sha1_object_info()
>> and skipping the printf() altogether instead?
>
> But then I cannot know the name of the failed tree entry.
Why?
if (sha1_object_info() == OBJ_BAD)
die("object recorded at tree entry %s is bad", pathname);
printf ...
next prev parent reply other threads:[~2009-03-19 22:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 20:30 [PATCH] Produce a nicer output in case of sha1_object_info failures in ls-tree -l Alex Riesen
2009-03-19 21:55 ` Junio C Hamano
2009-03-19 22:00 ` Alex Riesen
2009-03-19 22:13 ` Junio C Hamano [this message]
2009-03-19 22:54 ` Alex Riesen
2009-03-19 23:08 ` Junio C Hamano
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=7vmybh6u15.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=raa.lkml@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.