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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 1D7241F403 for ; Fri, 14 Oct 2022 17:13:57 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="brPTPTMC"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231268AbiJNRNe (ORCPT ); Fri, 14 Oct 2022 13:13:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbiJNRNc (ORCPT ); Fri, 14 Oct 2022 13:13:32 -0400 Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB5ECDBE79 for ; Fri, 14 Oct 2022 10:13:31 -0700 (PDT) Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 41E481C328A; Fri, 14 Oct 2022 13:13:31 -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:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=7iqBgoE422wNLDsx3aKwn16g0QR/RdH5bDrfPn iU71g=; b=brPTPTMC9Ms7PRwzRRVHDg9xaI0LD7oYqPGM2ZjAu8RZhpcsWmmXEd qHWvfcp6toG1NdpXNGyesReTUyXXQ0ZsEBSIFkfoGu4cdzxyQe8nFI4rCuPxjYTh l69kxuDvc9zTTjMnnVJp3McCD+n8WXIVamZIAqOIB0+9y/SxjLbRU= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 263FD1C3289; Fri, 14 Oct 2022 13:13:31 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.5.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 567C71C3286; Fri, 14 Oct 2022 13:13:28 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Jerry Zhang via GitGitGadget" Cc: git@vger.kernel.org, Jerry Zhang Subject: Re: [PATCH v3 3/7] builtin: patch-id: fix patch-id with binary diffs References: <2164212892712930cb34223499bb3e03bf2c2392.1665737804.git.gitgitgadget@gmail.com> Date: Fri, 14 Oct 2022 10:13:27 -0700 In-Reply-To: <2164212892712930cb34223499bb3e03bf2c2392.1665737804.git.gitgitgadget@gmail.com> (Jerry Zhang via GitGitGadget's message of "Fri, 14 Oct 2022 08:56:40 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 85420B96-4BE3-11ED-8619-C2DA088D43B2-77302942!pb-smtp20.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Jerry Zhang via GitGitGadget" writes: > From: Jerry Zhang > > "git patch-id" currently doesn't produce correct output if the > incoming diff has any binary files. Add logic to > get_one_patchid to handle the different possible styles of binary > diff. This attempts to keep resulting patch-ids identical to what > would be produced by the counterpart logic in diff.c, that is it > produces the id by hashing the a and b oids in succession. It is sad that we have two separate implementations in the first place. Do you see if it is feasible to unify the implementation by reusing one from the other (answering this is not a requirement for this patch to be looked at)?