git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Thomas Koch <thomas@koch.ro>
Cc: git@vger.kernel.org
Subject: Re: git am fails to add new files
Date: Wed, 3 Feb 2010 10:33:01 -0500	[thread overview]
Message-ID: <20100203153301.GA29692@coredump.intra.peff.net> (raw)
In-Reply-To: <201002021607.25719.thomas@koch.ro>

On Tue, Feb 02, 2010 at 04:07:25PM +0100, Thomas Koch wrote:

> I'm using GIT on Debian unstable (1.6.6.1). When applying patches I created 
> with git format-patch and applying them afterwards with git am, this fails 
> with every patch that adds a new file.
> Is there any option I forgot to give to git am? Or is this a bug.

No, it should just work. However, I can't replicate your problem using
the following script:

mkdir repo && cd repo && git init &&
echo 1 >file-1 && git add . && git commit -m one &&
echo 2 >file-2 && git add . && git commit -m two &&
git format-patch -1 --stdout >patch &&
git reset --hard HEAD^ &&
echo Confirm that file-2 is gone... &&
! grep . file-2 &&
git am patch &&
echo Confirm that file-2 is back... &&
grep . file-2

So perhaps there is something else going on. Can you provide us with
samples of the patches that fail to apply? What does "git am" say when
it tries to apply?

-Peff

      reply	other threads:[~2010-02-03 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 15:07 git am fails to add new files Thomas Koch
2010-02-03 15:33 ` Jeff King [this message]

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=20100203153301.GA29692@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=thomas@koch.ro \
    /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).