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

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

From
Jeff King <peff@peff.net>
Date
Mar 25, 2009, 04:49 UTC
Message-ID
<20090325044909.GA21311@coredump.intra.peff.net>
In-Reply-To
<fcaeb9bf0903242132k71e78219xfda5553854df4a2c@mail.gmail.com>
On Wed, Mar 25, 2009 at 03:32:17PM +1100, Nguyen Thai Ngoc Duy wrote:
Show 5 quoted lines
> 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.

Initial commit is fine with me. I plan to use this mostly for throw-away repositories. I was thinking it might be useful for this:

  tar xzf package-0.1.tar.gz
  cd package-0.1
  git init --import

so that later you remember it came from package-0.1 (when you are looking at package 0.2). OTOH, if we take the information from the directory, then the fact that it came from 0.1 is by definition already in the directory name. So it is pretty pointless unless you later rename the directory to just "package".

Show 5 quoted lines
> > 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?

I was, in fact, mis-remembering. The problem is not about long versus short options, but rather about options which have an optional value. See "Separating argument from the option" in "git help cli".

However, what we are discussing above _is_ making it an optional value, in which case "--import <arg>" would have no value for "--import".

-Peff
Previous: Nguyen Thai Ngoc DuyNext: Miles Bader
Message 8 of 10 in “init-db: support --import to add all files and commit right after init”
  1. init-db: support --import to add all files and commit right after initNguyễn Thái Ngọc Duy, Mar 25, 2009
  2. Shawn O. PearceMar 25, 2009
  3. Nguyen Thai Ngoc DuyMar 25, 2009
  4. Johannes SchindelinMar 25, 2009
  5. Nguyen Thai Ngoc DuyMar 25, 2009
  6. Jeff KingMar 25, 2009
  7. Nguyen Thai Ngoc DuyMar 25, 2009
  8. Jeff KingMar 25, 2009
  9. Miles BaderMar 31, 2009
  10. Jeff KingMar 31, 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.