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

Re: New directory lost by git am

From
Chris Packham <judge.packham@gmail.com>
Date
Mar 5, 2014, 03:08 UTC
Message-ID
<53169549.10309@gmail.com>
In-Reply-To
<531690A3.3040509@ubuntu.com>
Hi,
On 05/03/14 15:49, Phillip Susi wrote:
> I applied a patch with git am that adds a new source file to a new
> directory, and later noticed that file was missing from the commit.
> It seems that git am fails to add the new file/directory to the index.
> 

Could you provide a few more details such as your git version (git --version) and an example of the failure. I've tried to reproduce the problem based on the description provided but everything seems to work as expected for me.

  git --version
    git version 1.9.0
  mkdir test && cd test && git init
  echo "hello world" >a.txt
  git add a.txt
  git commit -m"Initial commit"
  git checkout -b temp
  mkdir b
  echo "lorem ipsum" >b/b.txt
  git add b/b.txt
  git commit -m"Add b/b.txt"
  ls -R
    .:
    a.txt  b
    ./b:
    b.txt
  git checkout master
  git format-patch temp -1 --stdout | git am
  ls -R
    .:
    a.txt  b
    ./b:
    b.txt
Previous: Phillip SusiNext: Phillip Susi
Message 2 of 10 in “New directory lost by git am”
  1. Phillip SusiMar 5, 2014
  2. Chris PackhamMar 5, 2014
  3. Phillip SusiMar 5, 2014
  4. Chris PackhamMar 5, 2014
  5. Phillip SusiMar 5, 2014
  6. Jeff KingMar 5, 2014
  7. Phillip SusiMar 5, 2014
  8. Jeff KingMar 5, 2014
  9. Phillip SusiMar 5, 2014
  10. Junio C HamanoMar 5, 2014

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.