Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

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

From: Jeff King <hidden>
Date: 2016-06-15 22:46:28

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:
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help