git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-init: inform user of `git --bare init' option

From
LRLuciano Rocha <luciano@eurotux.com>
Date
May 23, 2008, 14:24 UTC
Message-ID
<20080523142432.GA8360@bit.office.eurotux.com>
In-Reply-To
<7vy761sgks.fsf@gitster.siamese.dyndns.org>
On Thu, May 22, 2008 at 11:02:59PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Luciano Rocha <luciano@eurotux.com> writes:
> 
> > Creation of a bare repository isn't consistent:
> >
> > $ git init --bare
> > usage: git-init [-q | --quiet] [--template=<template-directory>] [--shared]
> > $ git --bare init
> > Initialized empty Git repository in ...
> 
> The examples do not demonstrate that "it isn't consistent".  It just
> demonstrates that it is easy for people to forget that --bare option is an
> option to the "git" potty itself and not an option to "git init".

Well, "git --help init" works the same as "git init --help", so "--bare" not working depending on its position isn't very consistent...

<patch snipped>
Show 5 quoted lines
> Given that you are adding a special case support for "git init --bare"
> anyway, a better approach to help people out of this easy confusion (and
> we have to admit that the confusion is very easy!) would be to make "git
> init --bare" pretend/behave as if the user said "git --bare init", don't
> you think?

Yes, but this was easy for me to do. The proper way, however, will take me more time.

-- 
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>
Previous: Junio C HamanoNext: Luciano Rocha
Message 6 of 12 in “bare --init Vs --init bare”
  1. Luciano RochaMay 19, 2008
  2. Santi BéjarMay 19, 2008
  3. Luciano RochaMay 19, 2008
  4. git-init: inform user of `git --bare init' optionLuciano Rocha, May 20, 2008
  5. Junio C HamanoMay 23, 2008
  6. Luciano RochaMay 23, 2008
  7. git-init: treat option `--bare'Luciano Rocha, May 28, 2008
  8. Luciano RochaMay 28, 2008
  9. Junio C HamanoMay 29, 2008
  10. Luciano RochaMay 29, 2008
  11. Johannes SchindelinMay 29, 2008
  12. Junio C HamanoMay 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.