From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Luciano Rocha <luciano@eurotux.com>
Subject: Re: [PATCH] git-init: treat option `--bare'
Date: Wed, 28 May 2008 17:55:46 -0700 [thread overview]
Message-ID: <7vzlqaq67h.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080528185357.GB4431@bit.office.eurotux.com> (Luciano Rocha's message of "Wed, 28 May 2008 19:53:57 +0100")
Luciano Rocha <luciano@eurotux.com> writes:
> Currently, passing the `--bare' option to git-init proper doesn't work, and
> gives no indication that `git --bare init' would work instead:
>
> $ git init --bare
> usage: git-init [-q | --quiet] [--template=<template-directory>] [--shared]
>
> Treat the `--bare' option internally in builtin-init-db.
>
> Also, fix the usage string, synchronising it with the synopsis in the
> documentation.
>
> Signed-off-by: Luciano Rocha <strange@nsk.pt>
It could be argued that this kind of "special casing to help common
mistake situation" would in the long run hamper the new users in
understanding what --bare means, because one who uses "git init --bare"
will not realize that --bare is an option to "git" potty in general and
can be given when invoking other git commands. On the other hand, many
commands do work sensibly inside a bare repository already, and "init" is
truly special in that it cannot inspect the surroundings to guess if the
user wants to create a bare repository or one with a work-tree because
there isn't a repository yet. In that sense, probably people not learning
"git --bare" is not such a loss after all.
In general, I am not particularly fond of this kind of special casing, but
initializing a bare repository would be a common enough operation that I
personally think it is probably Ok to take this as an exception.
Opinions? Breakages?
next prev parent reply other threads:[~2008-05-29 0:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 17:53 bare --init Vs --init bare Luciano Rocha
2008-05-19 19:32 ` Santi Béjar
2008-05-19 20:10 ` Luciano Rocha
2008-05-20 19:48 ` [PATCH] git-init: inform user of `git --bare init' option Luciano Rocha
2008-05-23 6:02 ` Junio C Hamano
2008-05-23 14:24 ` Luciano Rocha
2008-05-28 18:51 ` [PATCH] git-init: treat option `--bare' Luciano Rocha
2008-05-28 18:53 ` Luciano Rocha
2008-05-29 0:55 ` Junio C Hamano [this message]
2008-05-29 9:10 ` Luciano Rocha
2008-05-29 13:51 ` Johannes Schindelin
2008-05-29 18:31 ` Junio C Hamano
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=7vzlqaq67h.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=luciano@eurotux.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.
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).