git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] init-db: support --import to add all files and commit  right after init
Date: Wed, 25 Mar 2009 15:32:17 +1100	[thread overview]
Message-ID: <fcaeb9bf0903242132k71e78219xfda5553854df4a2c@mail.gmail.com> (raw)
In-Reply-To: <20090325041934.GA15524@coredump.intra.peff.net>

2009/3/25 Jeff King <peff@peff.net>:
>> +-m <message>::
>> +--import=<message>::
>> +
>> +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 <arg>" 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

  reply	other threads:[~2009-03-25  4:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25  2:09 [PATCH] init-db: support --import to add all files and commit right after init Nguyễn Thái Ngọc Duy
2009-03-25  2:14 ` Shawn O. Pearce
2009-03-25  2:27   ` Nguyen Thai Ngoc Duy
2009-03-25  3:51 ` Johannes Schindelin
2009-03-25  4:25   ` Nguyen Thai Ngoc Duy
2009-03-25  4:19 ` Jeff King
2009-03-25  4:32   ` Nguyen Thai Ngoc Duy [this message]
2009-03-25  4:49     ` Jeff King
2009-03-31  9:09   ` Miles Bader
2009-03-31  9:27     ` Jeff King

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=fcaeb9bf0903242132k71e78219xfda5553854df4a2c@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).