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-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 ABA311F5AE for ; Thu, 25 Jun 2020 18:10:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405930AbgFYSIW (ORCPT ); Thu, 25 Jun 2020 14:08:22 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:58961 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405552AbgFYSIW (ORCPT ); Thu, 25 Jun 2020 14:08:22 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 0B247E271B; Thu, 25 Jun 2020 14:08:20 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=vm+DkUixHS6QJDM+86W49kw5cII=; b=FRCk9M MGjwKohmvluqlO+jBDGIjLaZ156e6khYZTqEn4LUUbFmeACT84cPqvb2Pe2qJudF yPL1w0Xlant4qGAtyJKanXA9W/rlWY3CSvO2Hun+DrNfgcVOsTW/Gg5Rw8eiA7GZ hySnQ7nFr+ToYILpFWq02Z1oQhSEhNsyhSwMA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=DW7KnHxmZ2dVG3MGNCdgDmMHc1p7uyV0 eHfX0oQBVfEtigZlP/qcumvpHSG7F6U6Of2AfEPeOzjFJbeqCf6n+JFMW5fiag+m oQ96PqLsm4hiajGFxL5BTeg3Pcw1j0Af11mA7cs8/dxtLLiDF4IJethBcn81+Gv6 MQ5sGqlQAAI= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 031A4E271A; Thu, 25 Jun 2020 14:08:20 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 83D57E2719; Thu, 25 Jun 2020 14:08:16 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, Srinidhi Kaushik , Johannes Schindelin Subject: Re: [PATCH v4 1/2] diff-files --raw: show correct post-image of intent-to-add files References: <69256ab9107c3dba0dc007b69cc0ce98a9b91f9a.1593107621.git.gitgitgadget@gmail.com> Date: Thu, 25 Jun 2020 11:08:14 -0700 In-Reply-To: <69256ab9107c3dba0dc007b69cc0ce98a9b91f9a.1593107621.git.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Thu, 25 Jun 2020 17:53:40 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: D7C386D6-B70E-11EA-A737-8D86F504CC47-77302942!pb-smtp21.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Johannes Schindelin via GitGitGadget" writes: > diff --git a/diff-lib.c b/diff-lib.c > index 61812f48c2..25fd2dee19 100644 > --- a/diff-lib.c > +++ b/diff-lib.c > @@ -220,8 +220,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option) > } else if (revs->diffopt.ita_invisible_in_index && > ce_intent_to_add(ce)) { > diff_addremove(&revs->diffopt, '+', ce->ce_mode, > - the_hash_algo->empty_tree, 0, > - ce->name, 0); > + &null_oid, 0, ce->name, 0); This (even if the preimage were correctly using empty_blob) is *so* simple a change that it is very surprising that the new test in [2/2] passes without any other code change. It means that difftool was written correctly in the first place, right? Nicely done.