All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lea Wiemann <lewiemann@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] cat-file --batch / --batch-check: do not exit if hashes are missing
Date: Mon, 09 Jun 2008 02:05:46 +0200	[thread overview]
Message-ID: <484C73DA.10804@gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0806090033030.1783@racer>

Johannes Schindelin wrote:
> Lea Wiemann wrote:
>> -	if (type <= 0)
>> -		return 1;
>> +	if (type <= 0) {
>> +		printf("%s missing\n", obj_name);
>> +		fflush(stdout);
>> +		return 0;
>> +	}
> 
> Is it really intended that it returns 0 now?

Yes, return 0 causes it to not exit (which is the desired effect, as in 
documented).

> Further, should it not be an error("%s missin...  instead?  It is an 
> error, isn't it?

No, it's not an error.  I suggest you read git-cat-file.1 -- getting a 
response of "<object> missing" (rather than cat-file terminating) if you 
pass in a non-existent object is the desired behavior, and it happened 
before for named objects, like "HEAD", but not for full hashes.  Now it 
also happens for full hashes.

-- Lea

  reply	other threads:[~2008-06-09  0:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-08 23:28 [PATCH] cat-file --batch / --batch-check: do not exit if hashes are missing Lea Wiemann
2008-06-08 23:34 ` Johannes Schindelin
2008-06-09  0:05   ` Lea Wiemann [this message]
2008-06-09  1:02     ` Johannes Schindelin
2008-06-09 10:17       ` Lea Wiemann
2008-06-09 11:07         ` Jakub Narebski
2008-06-09 13:27           ` Lea Wiemann
2008-06-09  0:02 ` [PATCH v2] " Lea Wiemann
2008-06-09 20:37   ` Junio C Hamano
2008-06-09 20:42   ` Junio C Hamano
2008-06-09 14:23 ` [PATCH] " Johannes Sixt
2008-06-09 18:21   ` Lea Wiemann

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=484C73DA.10804@gmail.com \
    --to=lewiemann@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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.