All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Brauch <svenbrauch@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Cc: Jeff King <peff@peff.net>
Subject: Re: [PATCH] git-cat-file: fix output when format string contains no variables
Date: Wed, 06 Nov 2013 20:40:49 +0100	[thread overview]
Message-ID: <5085823.Oad8MOHc71@localhost.localdomain> (raw)
In-Reply-To: <xmqqsiv98l5y.fsf@gitster.dls.corp.google.com>

On Wednesday 06 November 2013 10:00:57 Junio C Hamano wrote:
> Thanks; first some procedural issues:
Thanks, I will take care of the mentioned points for future submissions.

> I think the real problem is that sha1_loose_object_info() is called
> by sha1_object_info_extended(), when it does not find a cached or a
> packed object, and the callee assumes that it is asked to fill in
> only the requested pieces of information while the caller does not
> even bother to check if such an object actually exists.
> 
> How about doing it like the attached instead?
Yes; this seems more like a proper fix. I would prefer it over my suggestion.
It is illogical that sha1_loose_object_info sometimes returns an error if the 
object does not exist and sometimes not, depending on which properties are 
requested.

Sven

      parent reply	other threads:[~2013-11-06 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 20:03 [PATCH] git-cat-file: fix output when format string contains no variables Sven Brauch
2013-11-06 18:00 ` Junio C Hamano
2013-11-06 18:31   ` Jeff King
2013-11-06 19:40   ` Sven Brauch [this message]

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=5085823.Oad8MOHc71@localhost.localdomain \
    --to=svenbrauch@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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 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.