From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 766621F8C6 for ; Fri, 20 Aug 2021 21:09:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239947AbhHTVK2 (ORCPT ); Fri, 20 Aug 2021 17:10:28 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:54304 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231171AbhHTVK2 (ORCPT ); Fri, 20 Aug 2021 17:10:28 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 781E0D0683; Fri, 20 Aug 2021 17:09:47 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=sasl; bh=uVtx6EyYcfdfBjZbkOzTCe866Os0QO6HVXw9KABbWMI=; b=KpPg YCQREuzADKIboLrdV1CZvaQtvsqJ3SLOhAy8HJGgrdMdc4nZ3pFXrKHVD4soZRjc MTh+zzTUfcjQMaX6HrcY17W6SwQH25eIWkD0k+AIsgnMlxNyD/0oExVce7SoplWJ vLOjQNc6aMZIKD3RxTT3tN3zM2KuZaE6WKFzo7Y= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 6EFBDD0682; Fri, 20 Aug 2021 17:09:47 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.116.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id EAA45D067E; Fri, 20 Aug 2021 17:09:46 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Gwyneth Morgan Cc: Adam Williamson , git@vger.kernel.org Subject: Re: git format-patch produces invalid patch if the commit adds an empty file? References: <02be6a48411fa100e7d1292fc312f7fcf571f334.camel@redhat.com> Date: Fri, 20 Aug 2021 14:09:46 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: F2DF19F2-01FA-11EC-A3EB-8B3BC6D8090B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Gwyneth Morgan writes: > GNU patch chokes in this case with an unquoted filename with spaces. When we settled what bytes (not characters) in a pathname will cause it to be quoted and how the quoting is done between us and GNU diff and patch maintainer back in Oct 2005, I thought that we excluded whitespace from the bytes that need quoting [*]. And I do not recall us changing the rule for pathname quoting since then (other than introduction of core.quotepath to disable quoting bytes with the 8th bit set). It may be a "recent" change on the GNU patch side, and I do not think we mind tweaking our diff output to be more accomodating iff that observation is true. I however understand that spaces in pathnames are not so uncommon especially among non-programmers and they may feel irritating having to see any pathname with spaces quoted. [Reference] * https://lore.kernel.org/git/Pine.LNX.4.64.0510111121030.14597@g5.osdl.org/