From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Packham Subject: Re: New directory lost by git am Date: Wed, 05 Mar 2014 21:10:20 +1300 Message-ID: <5316DBEC.3020208@gmail.com> References: <531690A3.3040509@ubuntu.com> <53169549.10309@gmail.com> <53169868.3010401@ubuntu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: Phillip Susi , "git@vger.kernel.org" X-From: git-owner@vger.kernel.org Wed Mar 05 09:10:47 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WL6uc-0000Pm-9p for gcvg-git-2@plane.gmane.org; Wed, 05 Mar 2014 09:10:46 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751880AbaCEIKb (ORCPT ); Wed, 5 Mar 2014 03:10:31 -0500 Received: from mail-pd0-f169.google.com ([209.85.192.169]:50562 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbaCEIKZ (ORCPT ); Wed, 5 Mar 2014 03:10:25 -0500 Received: by mail-pd0-f169.google.com with SMTP id fp1so740250pdb.14 for ; Wed, 05 Mar 2014 00:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=IIp5sxXtOIUd37xEFGmh0JLnQwc17qxM17GgpCLEA5Q=; b=iqW6/hrJnfwL9LXuoaqeHVAIjglH7dsmumEBCy0D1gCC3s7h64p77GrdMVPD1qpkrA fBEVYlC9httPfRu0JidzA7EjeNY+GhmUdPPO6Kfstmy435jcad6lhqiS6fbteUgKYhNL EXAqyHSs1Argt7rz8gisTBnfHg/X1GFQHYuOirsXULwwG+i1Xxm6Mc2OC30pX01JjMvc JiHrjrWsyxDUIwka+/zopsQDHXxAOIC8CQ2dV02qVjSYMO+/FyDvqmStTrC/Gob89tzR oVrH1nGVHBl0JL2j5GU2QpUV3b/nRu4hSlQuqM2riVpAHBVklyWDot+N1MBVE9L1v3Ak GEvw== X-Received: by 10.67.5.131 with SMTP id cm3mr5249855pad.92.1394007025194; Wed, 05 Mar 2014 00:10:25 -0800 (PST) Received: from linux.site (115-188-15-163.jetstream.xtra.co.nz. [115.188.15.163]) by mx.google.com with ESMTPSA id gj9sm5202510pbc.7.2014.03.05.00.10.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Mar 2014 00:10:24 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <53169868.3010401@ubuntu.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On 05/03/14 16:22, Phillip Susi wrote: > On 03/04/2014 10:08 PM, Chris Packham wrote: >> 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. > > Version 1.8.3.2. > >> 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 >> > > You are reapplying the patch while it is already applied. My example is creating a commit on the "temp" branch then applying it to the "master" branch using git am. > Do a reset > HEAD~1 --hard, and git clean -x -f -d before git am. I didn't notice > the missing file myself for some time because it is left in the > working tree, just not added to the index and included in the commit. > Regardless of reproducing the issue a quick glance at the Release notes for 1.8.3.3 the following sticks out: Fixes since v1.8.3.2 -------------------- * "git apply" parsed patches that add new files, generated by programs other than Git, incorrectly. This is an old breakage in v1.7.11. Does that sound like your problem? If you can I'd suggest updating, ideally to the recent 1.9.0 release but if you're feeling conservative try 1.8.3.4.