From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH 2/9] apply --whitespace=fix: detect new blank lines at eof correctly Date: Fri, 04 Sep 2009 09:26:20 -0700 Message-ID: <7vpra6n0b7.fsf@alter.siamese.dyndns.org> References: <1252061718-11579-1-git-send-email-gitster@pobox.com> <1252061718-11579-3-git-send-email-gitster@pobox.com> <4AA101BB.7010206@viscovery.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Junio C Hamano , git@vger.kernel.org To: Johannes Sixt X-From: git-owner@vger.kernel.org Fri Sep 04 18:27:14 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mjbd3-0008PJ-3Z for gcvg-git-2@lo.gmane.org; Fri, 04 Sep 2009 18:27:13 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933752AbZIDQ02 (ORCPT ); Fri, 4 Sep 2009 12:26:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933469AbZIDQ02 (ORCPT ); Fri, 4 Sep 2009 12:26:28 -0400 Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:54216 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933727AbZIDQ00 (ORCPT ); Fri, 4 Sep 2009 12:26:26 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 7C0252523B; Fri, 4 Sep 2009 12:26:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=to:cc:subject :references:from:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=rmOiocqGEjasSgAHw4bSKpC5QFw=; b=tDMTiU 8ZvHu7isRO4WqAPkH9lgyxGlTu5/bviXqqB57ZHRk+k82OOMLvEITwUQ4eEai2U1 Lloj/xM1qU9Cv9FvRb8C4ncJsOyUxCa3plx+zZYXkvOas2CvFKPah70KG2qWuLhS OFkLpyHTjqJY0ctxUDmWeEZSRt7DooLNdFSrA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=to:cc:subject :references:from:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=GwWMSOpWyltA8FAhZTdkZmDc3MtmVy0R nPlMLLg9GGNPArkVY+Zup+sxXLHg6Z0lXSKs+EPn+XuxLr/xvXbvPMeOjkWnovkp oYl4tCd5BOGWTI5MajwSGFVEkrpSSb8g/CgIo6a85DZP0AJOOAtG7yJJ0BH8JUPS bBz5ZJhIKjE= Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 5B5E525236; Fri, 4 Sep 2009 12:26:26 -0400 (EDT) Received: from pobox.com (unknown [68.225.240.211]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 9F8A425235; Fri, 4 Sep 2009 12:26:22 -0400 (EDT) In-Reply-To: <4AA101BB.7010206@viscovery.net> (Johannes Sixt's message of "Fri\, 04 Sep 2009 14\:02\:03 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-Pobox-Relay-ID: B1575806-996F-11DE-9C8F-CA0F1FFB4A78-77302942!a-pb-sasl-quonix.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Johannes Sixt writes: > After reading this explanation, I was worried that added blank lines that > are at the end of a patch but apply in the middle of a file would be > mis-attributed as blank lines at EOF. The codepath this patch is about checks "does the hunk result in more blank at the end of the place it applies to?". There is a separate logic that checks "does the hunk applies at the end of the file", which is the topic of the codepath that is fixed by Patch #1.