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 9A6EA1F5AE for ; Wed, 1 Jul 2020 21:03:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727114AbgGAVDm (ORCPT ); Wed, 1 Jul 2020 17:03:42 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:53863 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725915AbgGAVDm (ORCPT ); Wed, 1 Jul 2020 17:03:42 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id E90926A206; Wed, 1 Jul 2020 17:03:39 -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=BHdsdPFagtB/921D5zcIJEc4cnA=; b=w+NaEe ovW6TyNQ4KqjRd5nOXb4cPdTzTJ3vtxu416u/gVMFQjjunexxSrqph4t0MI9ZTQU ACEHNUz7Iy1G46TGitsGhjp+3t/yreB3K0Zdta0vWkPNRmYC8kaCW+vH55skjhpz l68xJTFFYWC6pPXXCxzM5HcnlUG41V2EOPXk4= 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=VlqQA9uew6Sk3qFKlmDiHRBSOgK1F+2e jpXUaj/woZHqEtk1TS3/zUhB5CJVZlEH6ypv/uaAHZ17N1H0ahyjjz/D8aJoD35a 7OuDiABYyUfzq8FvVpfR9vWRK1eIkvILuJv9tDBmpIn8OXefFehx3zjj8ihPmzNj Op2jIwSj23s= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id E12516A205; Wed, 1 Jul 2020 17:03:39 -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-smtp2.pobox.com (Postfix) with ESMTPSA id 6B2476A204; Wed, 1 Jul 2020 17:03:39 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Johannes Schindelin Cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org, Srinidhi Kaushik Subject: Re: [PATCH v4 2/2] difftool -d: ensure that intent-to-add files are handled correctly References: <9bb8d84ea956dcddefbe7b62baa3a5ff23b6b1e2.1593107621.git.gitgitgadget@gmail.com> Date: Wed, 01 Jul 2020 14:03:38 -0700 In-Reply-To: (Johannes Schindelin's message of "Wed, 1 Jul 2020 12:01:42 +0200 (CEST)") 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: 566153DC-BBDE-11EA-9D56-D1361DBA3BAF-77302942!pb-smtp2.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Johannes Schindelin writes: >> Can we fill the gap by saying how seeing the object name of empty >> blob (or worse, tree) instead of 0{40} made "difftool -d" upset? > > Sorry about catching this only now, after the commit hit `next`. > > Filling the gap is a slightly more complicated. > > And now that I looked at the code again, to make sure that I don't say > anything stupid, I realize that I just provided incorrect information in > my reply elsewhere in this thread: Srinidhi's fix is _not_ enough to fix > t7800 with this here patch. > > Your guess was almost spot on: the empty blob would have worked (as in: > not caused an error, but it would have shown incorrect information). The > problem really is the attempt trying to read the empty tree as if it was a > blob. That results in something like this: > > error: unable to read sha1 file of /tmp/git-difftool.O8CoK9/right/intent-to-add (4b825dc642cb6eb9a060e54bf8d69288fbee4904) > error: could not write 'intent-to-add' > > And yes, it would have been good to adjust the commit message as you > suggested. Sorry for not getting to it in time before it hit `next`. > > Do you want me to send out a v5 and drop v4 from `next` in favor of the > new iteration? That would help the future "us" quite a lot. Thanks for carefully thinking it through.