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

Re: [PATCH v3] init: support --import to add all files and commit right after init

From
Jeff King <peff@peff.net>
Date
Mar 26, 2009, 09:57 UTC
Message-ID
<20090326095716.GD14292@coredump.intra.peff.net>
In-Reply-To
<1238060943-4694-1-git-send-email-pclouds@gmail.com>
On Thu, Mar 26, 2009 at 08:49:03PM +1100, Nguyễn Thái Ngọc Duy wrote:
> This is equivalent to "git init;git add .;git commit -q -m blah".
> I find myself doing that too many times, hence this shortcut.
This version looks OK to me, but I have a few comments:
Show 5 quoted lines
>  Hopefully I don't make any mistake this time. -m will not take any argument
>  for two reasons:
> 
>   - optional argument for short options does not appear anywhere in git AFAIK.
>     let's not make parse-opt migration more difficult with -mfoo or -m=foo

shortlog's -w has optional arguments (and is the option that spawned the discussion that led to Pierre writing the gitcli(7) text, IIRC). So parse-options does handle it, but you _cannot_ say "-m foo" anymore.

> +-m::
> +--import[=<message>]::
Nit: -m made sense when it specified a message. But now that it doesn't
take a message, maybe "-i" would be more appropriate?
> +If `-m` is used or no message is given to `--import`, "Initial commit" will be used.
Style nit: long line.
-Peff
Previous: Nguyễn Thái Ngọc Duy
Message 2 of 2 in “init: support --import to add all files and commit right after init”
  1. init: support --import to add all files and commit right after initNguyễn Thái Ngọc Duy, Mar 26, 2009
  2. Jeff KingMar 26, 2009

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.