git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <junkio@cox.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] Allow git-diff exit with codes similar to diff(1)
Date: Tue, 13 Mar 2007 18:13:12 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703131757080.9690@woody.linux-foundation.org> (raw)
In-Reply-To: <81b0412b0703131717k7106ee1cg964628f0bda2c83e@mail.gmail.com>



On Wed, 14 Mar 2007, Alex Riesen wrote:
>
> This introduces a new command-line option: --exit-code. The diff
> programs will return 1 for differences, return 0 for equality, and
> something else for errors.

I don't think you should need a new command-line option.

Is there any reason to not just do this unconditionally?

> As promised on irc. I'm somewhat confused about diff_tree: it used to
> unconditionally return 0, yet every caller of it saves and passes the
> value!

I think we just never implemented the error codes, but they were always 
meant to be there.

I also thought I did some early-out logic (for the revision list pruning 
thing), where the "show_entry()" routine could return a negative value to 
say "Ok, no need to do anything more" but apparently I never added that..

[ I have this very distinct memory of working on it, but either I was 
  dreaming or I never got it working.. ]

			Linus

  parent reply	other threads:[~2007-03-14  1:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14  0:17 [PATCH] Allow git-diff exit with codes similar to diff(1) Alex Riesen
2007-03-14  1:03 ` Johannes Schindelin
2007-03-14  1:20   ` Linus Torvalds
2007-03-14  1:23   ` Junio C Hamano
2007-03-14  1:13 ` Linus Torvalds [this message]
2007-03-14  1:18   ` Johannes Schindelin
2007-03-14  1:34     ` Linus Torvalds
2007-03-14  1:38       ` Johannes Schindelin
2007-03-14  8:37         ` Alex Riesen
2007-03-14 12:05           ` Johannes Schindelin
2007-03-14 12:26             ` Alex Riesen
2007-03-14 12:31               ` Johannes Schindelin
2007-03-15 12:49               ` Simon 'corecode' Schubert
2007-03-15 13:56                 ` Alex Riesen
2007-03-14  1:31   ` Junio C Hamano
2007-03-14  8:19     ` Alex Riesen
2007-03-14  8:58       ` Junio C Hamano
2007-03-14  9:06         ` Junio C Hamano
2007-03-14  9:07         ` Alex Riesen
2007-03-14  9:36           ` Junio C Hamano
2007-03-14  9:46             ` Alex Riesen
2007-03-14  4:56 ` Junio C Hamano
2007-03-14  8:28   ` Alex Riesen
2007-03-14  9:04     ` Junio C Hamano
2007-03-14 14:01       ` Alex Riesen
2007-03-14 16:14         ` Junio C Hamano
2007-03-14 16:33           ` Alex Riesen
2007-03-14 16:37             ` Junio C Hamano
2007-03-14 17:12               ` Alex Riesen
2007-03-14 17:20                 ` Junio C Hamano
2007-03-14 17:06             ` Junio C Hamano
2007-03-14 17:15               ` Alex Riesen

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0703131757080.9690@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).