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

Re: Help requested - trying to build a tool doing whole-tree commits

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Nov 9, 2012, 21:50 UTC
Message-ID
<m2txsyqwdi.fsf@igel.home>
In-Reply-To
<20121109182024.81074BC66D4@golux>
Unknown <unknown@unknown.invalid> writes:
Show 11 quoted lines
> I need a command or command sequence that will commit an entire file
> tree to a repository...
>
> (a) Allowing me to specify committer and author metadata, and
>
> (b) deleting paths not present in the previous commit on the current
> branch, and
>
> (c) allowing me to specify merge links from other previous commits.
>
> git commit -a passes (a) and (b) but not (c).

git commit -a won't add new files, so you probably want to use git add -A && git commit. I'm not quite sure what you mean with "merge links", but if you want to create merge commits the you'll need to resort to plumbing: git add -A && git write-tree && git commit-tree && git update-ref.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: UnknownNext: Felipe Contreras
Message 2 of 5 in “Help requested - trying to build a tool doing whole-tree commits”
  1. UnknownNov 9, 2012
  2. Andreas SchwabNov 9, 2012
  3. Felipe ContrerasNov 10, 2012
  4. Junio C HamanoNov 10, 2012
  5. Eric S. RaymondNov 11, 2012

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.