From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phillip Susi Subject: Re: New directory lost by git am Date: Wed, 05 Mar 2014 11:47:12 -0500 Message-ID: <53175510.7020000@ubuntu.com> References: <531690A3.3040509@ubuntu.com> <53169549.10309@gmail.com> <53169868.3010401@ubuntu.com> <5316DBEC.3020208@gmail.com> <53173423.6050708@ubuntu.com> <20140305163415.GA28908@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Chris Packham , "git@vger.kernel.org" To: Jeff King X-From: git-owner@vger.kernel.org Wed Mar 05 17:47:22 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 1WLEyV-0002ac-BG for gcvg-git-2@plane.gmane.org; Wed, 05 Mar 2014 17:47:19 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752392AbaCEQrP (ORCPT ); Wed, 5 Mar 2014 11:47:15 -0500 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:47434 "EHLO cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751573AbaCEQrO (ORCPT ); Wed, 5 Mar 2014 11:47:14 -0500 X-Authority-Analysis: v=2.0 cv=H69ZMpki c=1 sm=0 a=/DbS/tiKggfTkRRHPZEB4g==:17 a=JipEcVzqA9wA:10 a=JbtRu-yXPzkA:10 a=S1A5HrydsesA:10 a=Qsx_du5GiBkA:10 a=IkcTkHD0fZMA:10 a=fxJcL_dCAAAA:8 a=KGjhK52YXX0A:10 a=QfKxxUxMAAAA:8 a=Xwi7FSJXiisUCSvvRuUA:9 a=QEXdDO2ut3YA:10 a=/DbS/tiKggfTkRRHPZEB4g==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 67.78.168.186 Received: from [67.78.168.186] ([67.78.168.186:60392] helo=[10.1.1.236]) by cdptpa-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 76/59-11872-F0557135; Wed, 05 Mar 2014 16:47:11 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <20140305163415.GA28908@sigill.intra.peff.net> X-Enigmail-Version: 1.6 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 3/5/2014 11:34 AM, Jeff King wrote: > I don't think those steps are necessary for Chris's example. When > he switches back to the master branch, git removes the subdirectory > (the file is tracked in "temp" but not "master", so we remove it > when switching branches, and then the directory is empty, so we > clean it up, too). You can verify with an extra "ls" after the > checkout but before the "am". Right. >>> * "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. >> >> Vaguely, except for the "other than git" part. This patch was >> generated by git-format-patch ( I didn't think apply handled >> patches that weren't ). > > I can't get Chris's script to fail on any version of git. Can you > show us an example of a patch that does not behave (or better yet, > a reproduction recipe to generate the patch with "format-patch")? AHA! It requires a conflict. There were simple conflicts in the NEWS file so I applied the patch with git am --reject and fixed up the NEWS, and ran git am --resolved. The git am --reject fails to add the new directory to the index. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTF1UOAAoJEI5FoCIzSKrwTD4H/35pUf8DFsbwPIVVQi+8I8e3 5NMHwQrHK3TPbZigVPBgVfwRCtOAxX656BPhninfhix99HWs00W5zGaFDwkymRNp 87EeU3LVcIjapqijszw9AqwBLvfm9uzXEus964hShCJVOmKBezQfl6Mvcrkn5Na1 UchJLkRzEoi6VUyUso8FH0xpL7JyjF08H19dtvXoUbrvrXYuN1Ys3UMBHXVEVdi+ 5O924lo4+psgdjGZ3HUpclYRbKO0LS5IVMCxFRw5Q+EfARJQ7NXzv/csRXIKyms7 roCQqmQnnem71GHx6SQaepnY5pKuEnmmDaqXbCOqZdpyfo1CB7SFJDq/VXrbLyw= =zS2r -----END PGP SIGNATURE-----