git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Jacob Keller <jacob.keller@gmail.com>,
	Ronny Borchert <mister_rs@web.de>,
	Git mailing list <git@vger.kernel.org>
Subject: Re: [BUG] --bare is ignored before command word
Date: Wed, 18 Nov 2015 23:46:46 -0500	[thread overview]
Message-ID: <20151119044646.GA8059@sigill.intra.peff.net> (raw)
In-Reply-To: <vpqa8qbov2n.fsf@anie.imag.fr>

On Wed, Nov 18, 2015 at 10:29:20PM +0100, Matthieu Moy wrote:

> But as you say, options before the command word apply to "git", not to
> the particular command. The case of --bare is a bit unfortunate: both
> "git" and "git clone" accept a --bare option, with a different meaning
> (read "man git" to find what the first does).
> 
> So, I wouldn't call the current behavior a really good one, but it's the
> documented behavior.
> 
> It would be nice to warn in this case though: I don't see any use for
> "git --bare clone".

We have a similar situation for "git init". Once upon a time there was
just "git --bare init", and then 74d3b23 (git-init: accept --bare
option, 2008-05-28) let us do it either way.

I'm tempted to say that "git --bare clone" should work the same way.
Both init and clone are special in that they are always about creating a
new repository, not working in an existing one.  That's technically a
non-compatible behavior change, but AFAICT with the current code the
option is silently ignored, which just seems buggy.

But perhaps I am missing some useful effect it does have.

I'd also be OK with simply flagging it as useless and issuing a warning
or error.

-Peff

  reply	other threads:[~2015-11-19  4:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 17:20 [BUG] --bare is ignored before command word Ronny Borchert
2015-11-18 20:08 ` Jacob Keller
2015-11-18 21:29   ` Matthieu Moy
2015-11-19  4:46     ` Jeff King [this message]
2015-11-20 14:52       ` Matthieu Moy

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=20151119044646.GA8059@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.com \
    --cc=mister_rs@web.de \
    /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).