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: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id F39481F54E; Mon, 22 Aug 2022 02:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1661135104; bh=RfKE4cZGLi5lsTTRqEu8tynhWgaF/6soMXaViLJwYTE=; h=Date:From:To:Cc:Subject:From; b=qtfGOyfx30Dv6A68omjRLoi++yb6sUc3g7sw0YSSyIulhEc6YVvRqETws0GqGJ+7h nTGaM5xS55fyLsCHBXeJjeitsqHXPcL9BvPhWwS7Y50VGWaBDrCJaBRiGJQWfPgsm9 Di8yYmRT/B/XK+JFnkO/g/qMPzmb1dZwZ3laj3Y8= Date: Mon, 22 Aug 2022 02:25:03 +0000 From: Eric Wong To: git@vger.kernel.org Cc: meta@public-inbox.org Subject: `git patch-id --stable' vs quoted-printable Message-ID: <20220822022503.M873583@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: While poking around at the newish patchid indexing support in public-inbox[1], I noticed an inconsistency in how it seems to mishandle quoted-printable messages. For instance, René's message can apply fine with `git am': https://public-inbox.org/git/6727daf1-f077-7319-187e-ab4e55de3b2d@web.de/raw However, note the blank context lines are truly blank, as in /^$/, not /^ $/. Running `git patch-id --stable' on the decoded content of that message gives me: a245e99dbd2ce6e319955569eb8a111cb044f474 And that's the value public-inbox indexes. That patch ends up being commit fc0f8bcd64eb0a03a7098f72da9c4008bd48cf11 in git.git. However, `git show fc0f8bcd64eb0a03a7098f72da9c4008bd48cf11 |git patch-id --stable' gives me: fcac4cf581e11b703c229a129072c95c79b68bf So, I'm wondering if the search indexing code of public-inbox should s/^$/ /mgs before feeding stuff to `git patch-id'; and/or if `git patch-id' should be assuming empty lines and lines with a single SP are the same... [1] https://public-inbox.org/meta/20220620192730.550803-3-e@80x24.org/