From: Nguyen Thai Ngoc Duy Date: Wed, 25 Mar 2009 04:32:17 GMT Subject: Re: [PATCH] init-db: support --import to add all files and commit right after init Message-ID: In-Reply-To: <20090325041934.GA15524@coredump.intra.peff.net> 2009/3/25 Jeff King : >> +-m :: >> +--import=:: >> + >> +Commit everything to the newly initialized repository. This is equivalent to: > > Maybe this is being too lazy, but I think it would be useful to allow > just "--import" without a message to default to "Initial commit", > "initial import from `basename $PWD`", or something like that. I tend to do "commit -q -m i", not a big deal for two more keystrokes. My initial version allowed "git init /path/to/workdir" too so it might be ambiguous for optional message. So all vote for "Initial commit"? Dynamic message seems overkill because most of the cases, this is a throw away repository. >> +             else if (!strcmp(arg, "--import") || !strcmp(arg, "-m")) { >> +                     if (i+1 >= argc) >> +                             die("--import requires an import message"); >> +                     import_message = argv[2]; >> +                     i++; >> +                     argv++; >> +             } > > I seem to recall that we were phasing out "--long-option " at some > point, and that all long-options should use "--long-option=". But maybe > I am mis-remembering. I did not know too. Any reference? -- Duy