From: Jeff King <peff@peff.net>
To: atousa.p@gmail.com
Cc: git@vger.kernel.org, Atousa Pahlevan Duprat <apahlevan@ieee.org>
Subject: Re: [PATCH v1] git rev-list doesn't complain when repo is empty
Date: Wed, 25 Nov 2015 04:10:11 -0500 [thread overview]
Message-ID: <20151125091010.GD4696@sigill.intra.peff.net> (raw)
In-Reply-To: <1448434853-7527-1-git-send-email-apahlevan@ieee.org>
On Tue, Nov 24, 2015 at 11:00:53PM -0800, atousa.p@gmail.com wrote:
> From: Atousa Pahlevan Duprat <apahlevan@ieee.org>
>
> Signed-off-by: Atousa Pahlevan Duprat <apahlevan@ieee.org>
> ---
> builtin/rev-list.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/rev-list.c b/builtin/rev-list.c
> index d80d1ed..f71b87f 100644
> --- a/builtin/rev-list.c
> +++ b/builtin/rev-list.c
> @@ -348,7 +348,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
> (!(revs.tag_objects || revs.tree_objects || revs.blob_objects) &&
> !revs.pending.nr)) ||
> revs.diff)
> - usage(rev_list_usage);
> + return 0; // empty repo
Even if we were to agree that rev-list should exit with code 0 for "git
rev-list --all" in an empty repo, I do not think this patch is the right
way to do it. It also catches:
git rev-list
with no arguments in a non-empty repository, which should produce a
usage() message.
-Peff
next prev parent reply other threads:[~2015-11-25 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 18:26 Suspected bug on `git -C <rp> rev-list --all` where <rp> has 0 commits yac
2015-11-25 6:56 ` Atousa Duprat
2015-11-25 7:00 ` [PATCH v1] git rev-list doesn't complain when repo is empty atousa.p
2015-11-25 9:10 ` Jeff King [this message]
2015-11-25 9:07 ` Suspected bug on `git -C <rp> rev-list --all` where <rp> has 0 commits 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=20151125091010.GD4696@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=apahlevan@ieee.org \
--cc=atousa.p@gmail.com \
--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 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).