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

git am from scratch

From
AGAndreas Gruenbacher <agruen@suse.de>
Date
Mar 19, 2009, 15:09 UTC
Message-ID
<200903191609.24812.agruen@suse.de>
Hello,

lates git (e986ceb0): there is a bug in git am when trying to recreate the entire history of a repository:

	$ git format-patch --stdout rcs-history \
		| ( rm -rf fOo && mkdir fOo && cd fOo && git init && git am )
	Initialized empty Git repository in /home/agruen/git/patch/foo/.git/
	fatal: HEAD: not a valid SHA1
	fatal: bad revision 'HEAD'

When the first commit is added by hand instead, git am will import the rest of the mbox without problems. This is annoying because it's at least not immediately obvious how to recreate the initial commit with all the metadata.

Is this easily fixed?

Thanks, Andreas

Next: Eric Raible
Message 1 of 8 in “git am from scratch”
  1. Andreas GruenbacherMar 19, 2009
  2. Eric RaibleMar 19, 2009
  3. Jeff KingMar 19, 2009
  4. Andreas GruenbacherMar 19, 2009
  5. Jeff KingMar 19, 2009
  6. Junio C HamanoMar 19, 2009
  7. Andreas GruenbacherMar 20, 2009
  8. Jeff KingMar 20, 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.