From patchwork Wed Jul 19 17:55:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13319306 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F071EC001B0 for ; Wed, 19 Jul 2023 17:55:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbjGSRzu (ORCPT ); Wed, 19 Jul 2023 13:55:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjGSRzr (ORCPT ); Wed, 19 Jul 2023 13:55:47 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 266FE1FC8 for ; Wed, 19 Jul 2023 10:55:46 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-ca3cc52ee62so7124893276.0 for ; Wed, 19 Jul 2023 10:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1689789345; x=1692381345; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VjDFejuWKGlSbUdQaaJtU12JRYZV7Y0QRujYk6p/egM=; b=uefiDar9F1UpVga/AOk3TeWEUbNuy1J/CHY+LLPeWI7ffK5Tai5cy/sL/v/glDAfe6 GLjNhnG2UxsLQ2d4Znah0PrnONYwTWRUkO+KLQm4HV1VOIIEUvS3Tgo3f9uoaJbEdJHn AxIvDaUVtomKyCpxj/eguSGrlVGSdJX8kLtD/4olLdzo+wL4SJmc9VZk3f1E4en3N/Ve 8IihMdhgWGHDnptKlGMJUNTlPxIg3/prQz/XrhV8KyPoO13JyXDRGT99HqvwF67ra5gI rJ4AHpybxYoM6qCcI2zuf0P2ZSYD7/MitVb2UUDxJwkKmOAGc6Xrn4aYVTG5AK/MWZ+D 7HyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689789345; x=1692381345; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VjDFejuWKGlSbUdQaaJtU12JRYZV7Y0QRujYk6p/egM=; b=N8uXNYkw2FLb2uSRfnCbqUG7GoKrYg11TTmDoGWh+ylyxTOY9FIWanxHySOr413Qrk K6XnR1sqXupbtVT5WAqaFdfWStelzOkmgCWyr29TK9NKySZPA7De8nqEL5O9/WK3f355 3W/A8mg+lPTeDBBq0ypW231/49CPtwDWzMFq5pXvkS2OIY42VDPnwYiHop5VpZzJkBb6 ktVfV81vS/kC/PD8CNHP8Z9uK4bNSzASz0fE+Ttdt9COpNdKIaFBiGqaQY1dIk4Xh0Yr jqO357RZX/tEBVjCANLq6htl6QHEJs+2MZdDhwWueL+PYoVIgtXPR0cb33dY+GrYtbHD zd3w== X-Gm-Message-State: ABy/qLY6Kibs6+AcMRNy4cXVvD7+NF06oDOTBMBKTvHK0iA1cX419Uf9 epqPEbr7LdPmuKIfWvmKfd7zkyv9n3sBG1bcBE6w5g== X-Google-Smtp-Source: APBJJlFw0XFlWpqmdgXcEDBBAghYFYEzB50XNgbgh+Er5EZkDxyWyQcHiVSuweFnhMT8C2uTcI5Gwg== X-Received: by 2002:a5b:94a:0:b0:bff:242b:78d0 with SMTP id x10-20020a5b094a000000b00bff242b78d0mr2980585ybq.34.1689789345159; Wed, 19 Jul 2023 10:55:45 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id t188-20020a2546c5000000b00c4f175716fcsm990112yba.20.2023.07.19.10.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 10:55:44 -0700 (PDT) Date: Wed, 19 Jul 2023 13:55:44 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Jonathan Tan , Derrick Stolee , Junio C Hamano Subject: [PATCH 1/4] t/helper/test-read-graph.c: extract `dump_graph_info()` Message-ID: <215419bf3c21ce630ce6a8b06e5c1034c6d878f5.1689789226.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Prepare for the 'read-graph' test helper to perform other tasks besides dumping high-level information about the commit-graph by extracting its main routine into a separate function. Signed-off-by: Taylor Blau --- t/helper/test-read-graph.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c index 8c7a83f578f..c6649284123 100644 --- a/t/helper/test-read-graph.c +++ b/t/helper/test-read-graph.c @@ -5,20 +5,8 @@ #include "bloom.h" #include "setup.h" -int cmd__read_graph(int argc UNUSED, const char **argv UNUSED) +static void dump_graph_info(struct commit_graph *graph) { - struct commit_graph *graph = NULL; - struct object_directory *odb; - - setup_git_directory(); - odb = the_repository->objects->odb; - - prepare_repo_settings(the_repository); - - graph = read_commit_graph_one(the_repository, odb); - if (!graph) - return 1; - printf("header: %08x %d %d %d %d\n", ntohl(*(uint32_t*)graph->data), *(unsigned char*)(graph->data + 4), @@ -57,8 +45,27 @@ int cmd__read_graph(int argc UNUSED, const char **argv UNUSED) if (graph->topo_levels) printf(" topo_levels"); printf("\n"); +} + +int cmd__read_graph(int argc UNUSED, const char **argv UNUSED) +{ + struct commit_graph *graph = NULL; + struct object_directory *odb; + + setup_git_directory(); + odb = the_repository->objects->odb; + + prepare_repo_settings(the_repository); + + graph = read_commit_graph_one(the_repository, odb); + if (!graph) + return 1; + + dump_graph_info(graph); UNLEAK(graph); return 0; } + + From patchwork Wed Jul 19 17:55:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13319307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42B5EC001B0 for ; Wed, 19 Jul 2023 17:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbjGSRzx (ORCPT ); Wed, 19 Jul 2023 13:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjGSRzu (ORCPT ); Wed, 19 Jul 2023 13:55:50 -0400 Received: from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com [IPv6:2607:f8b0:4864:20::92c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E18A1FD9 for ; Wed, 19 Jul 2023 10:55:48 -0700 (PDT) Received: by mail-ua1-x92c.google.com with SMTP id a1e0cc1a2514c-7943bfaed0dso2440223241.0 for ; Wed, 19 Jul 2023 10:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1689789348; x=1692381348; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OUK+kS+k7mtsGqJg0dt3rQfpUbUpYneqSPgxiJQ86o0=; b=FHUJXT5pC6PpXamxFTSFIVgbUvJB3RRNEgF8FWbZ0WbLlz7aCunvdLXXsusDZVKEbX FfOjk9mDG4EWOdBTTaAB3grgNz4Urx603dY1dfm8lBujrJArsAvDVUmjik4N2k/Kesdc 5gfvznx3y7EYuzx7DhXs4oLAH62Mw/oiIUn5E9UX4ag3G6lwlV4aFFqSZf65ED+H0Eha VBAfSQ7YUQwh4XDeFDrnYN5IRJfRr7KcrSKCRqTpibIw7/4ljSv1OxIuKIBncow5yYzw aYZJJZCCp+B9q2t6X3W54L8rtbfcqao68dA3ASF0LlNPjaS2D+JHyH2uVR7+7ZXTQ+xe 0QoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689789348; x=1692381348; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OUK+kS+k7mtsGqJg0dt3rQfpUbUpYneqSPgxiJQ86o0=; b=JAkO0RqI5pFtmRO20iHE+qtgOJHcS/MFpaJ0k7jvZjZsDrSZRjRLu61oUZfsVCRBBP hFO/mWnUOyqPK8PQygj3LosnGAzWdm4i1y+y5Xl88R6p9OZm/HwWyxxgSo6DNmqyifV2 HltmUXop1lmenDncCy6ibzL7T302LzI0k7ZixRFcDB6loeO3EcGoFzsgq02HhexvjfVy YcU7yyIYw0IvyIJChw/QpikoKvlxTOF3VSxox70KNbNjANp1qTVs+V4GFH0q7Zq/Z6gE Tw4WVWMT+LTePfg0Sdwz/c3EfdS+y/flO8JxPwi6Ha4KuoOj8DJdNFCEIsZ45N9eP1zR lZVQ== X-Gm-Message-State: ABy/qLYFMUzzv6UJ7p+mi4e3uFSymLf4f6wEajNW8TV3ZcbFgYmRQiwg RTmr2LSOq1U20TeEi0cGUdcBZ8qQmQ6Pd7Vh+j9FJw== X-Google-Smtp-Source: APBJJlGzx0aCmeZcVQc1kH0M3v6dRHV36zk5BWFmaTSLhxZ2t96uOeK3c2+YXUrMHmBrBISp2qvQXw== X-Received: by 2002:a67:fd62:0:b0:440:981b:3840 with SMTP id h2-20020a67fd62000000b00440981b3840mr2231104vsa.31.1689789347868; Wed, 19 Jul 2023 10:55:47 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id a84-20020a0dd857000000b0057a560a9832sm1149401ywe.1.2023.07.19.10.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 10:55:47 -0700 (PDT) Date: Wed, 19 Jul 2023 13:55:46 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Jonathan Tan , Derrick Stolee , Junio C Hamano Subject: [PATCH 2/4] bloom.h: make `load_bloom_filter_from_graph()` public Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Prepare for a future commit to use the load_bloom_filter_from_graph() function directly to load specific Bloom filters out of the commit-graph for manual inspection (to be used during tests). Signed-off-by: Taylor Blau --- bloom.c | 6 +++--- bloom.h | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bloom.c b/bloom.c index aef6b5fea2d..3e78cfe79d4 100644 --- a/bloom.c +++ b/bloom.c @@ -29,9 +29,9 @@ static inline unsigned char get_bitmask(uint32_t pos) return ((unsigned char)1) << (pos & (BITS_PER_WORD - 1)); } -static int load_bloom_filter_from_graph(struct commit_graph *g, - struct bloom_filter *filter, - uint32_t graph_pos) +int load_bloom_filter_from_graph(struct commit_graph *g, + struct bloom_filter *filter, + uint32_t graph_pos) { uint32_t lex_pos, start_index, end_index; diff --git a/bloom.h b/bloom.h index adde6dfe212..1e4f612d2c2 100644 --- a/bloom.h +++ b/bloom.h @@ -3,6 +3,7 @@ struct commit; struct repository; +struct commit_graph; struct bloom_filter_settings { /* @@ -68,6 +69,10 @@ struct bloom_key { uint32_t *hashes; }; +int load_bloom_filter_from_graph(struct commit_graph *g, + struct bloom_filter *filter, + uint32_t graph_pos); + /* * Calculate the murmur3 32-bit hash value for the given data * using the given seed. From patchwork Wed Jul 19 17:55:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13319308 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1A2DC001DE for ; Wed, 19 Jul 2023 17:55:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbjGSRzy (ORCPT ); Wed, 19 Jul 2023 13:55:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbjGSRzw (ORCPT ); Wed, 19 Jul 2023 13:55:52 -0400 Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E6371FCB for ; Wed, 19 Jul 2023 10:55:51 -0700 (PDT) Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5634808e16eso4583821eaf.2 for ; Wed, 19 Jul 2023 10:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1689789350; x=1692381350; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yoDq01+VNd7jmgdH9dZC8g/2pAdNYqa10qv8NrzKSaA=; b=2PVJaQm6DMVEtTZOp3N9hibLaiI8DRkfwK30Ly4AUZ78bic+37BoCIhIxgud6Le1sD vnz9YWYYXaQJj8OfptfK9yqhSLxhoqiHKhRg3n3JAbzU8nVpl5gQufpzbSQpTkvoQN6o Lsy/LGE1OiA35+mN7pfyUJatT10Qmq5o8LCKo90NCCZRrxKiNmwxP72aWSIxn2GDHCJi PoJX5Ul30vXdY/vMfdRpyqiy1hjsAjFvewF8b4BDXCvxOV59//wWOeom+oL++uu71KBS l8lq2/Wn9meE210rbrQ57yqef7u6NZ2s/qN3SY+ZZvqcaMV4K9GmxIeZjN4LPgSKD2vt QSgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689789350; x=1692381350; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yoDq01+VNd7jmgdH9dZC8g/2pAdNYqa10qv8NrzKSaA=; b=cFzQtnn4eg0T3/WZDVkdUrKKxjHg0pRD12D5mn0yRoOpz8kp+NN671XQp6hrpLWYoB ZJd4cwWt/YbAmaGTLKU8X1td3zDWPxk50eRWIBzFjfW67tmxZTFxopDtz1KpZdmdkx26 UDlZFnhhgYL4DfMOjE773vxxBpdVedY5A5OfsWIZjfoCbglrSd1SdogYa/Myajia6axG BqJB2+eFuzX0kwKXBjJM8PFQQgHSyWuvxI2JBlTbN8Z8weEZdRj2TMM9tX8YwyuTKkTR wZR6p5fs+niO2vWzMHFbxe4EvVA2BuzJBSCR0zFQ6DYZlaKur/ycK2mNusCwVo9YLOoI v+Pg== X-Gm-Message-State: ABy/qLZwqi8SoND9mI2OVAoU2azRWC32J87mXqI8ygNLvBft9EP146K3 3Gbw3HfkhXicmiU2SCqXASK/4v9LuMKR0sjytQKhlQ== X-Google-Smtp-Source: APBJJlF+9n5WqeJ5fKqT+iFUcva6MNZyhJGOD9as84llHE8biXmR0mNFEBmZ6+zg8CdWM+GpVu+1uA== X-Received: by 2002:a05:6808:14d5:b0:3a1:f237:ec62 with SMTP id f21-20020a05680814d500b003a1f237ec62mr8441506oiw.48.1689789350681; Wed, 19 Jul 2023 10:55:50 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id t62-20020a0dd141000000b0057725aeb4afsm1134357ywd.84.2023.07.19.10.55.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 10:55:50 -0700 (PDT) Date: Wed, 19 Jul 2023 13:55:49 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Jonathan Tan , Derrick Stolee , Junio C Hamano Subject: [PATCH 3/4] t/helper/test-read-graph: implement `bloom-filters` mode Message-ID: <51463636135842c1041af54ea460a54e2cf3055a.1689789226.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Implement a mode of the "read-graph" test helper to dump out the hexadecimal contents of the Bloom filter(s) contained in a commit-graph. Signed-off-by: Taylor Blau --- t/helper/test-read-graph.c | 42 +++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c index c6649284123..da9ac8584da 100644 --- a/t/helper/test-read-graph.c +++ b/t/helper/test-read-graph.c @@ -47,10 +47,32 @@ static void dump_graph_info(struct commit_graph *graph) printf("\n"); } -int cmd__read_graph(int argc UNUSED, const char **argv UNUSED) +static void dump_graph_bloom_filters(struct commit_graph *graph) +{ + uint32_t i; + + for (i = 0; i < graph->num_commits + graph->num_commits_in_base; i++) { + struct bloom_filter filter = { 0 }; + size_t j; + + if (load_bloom_filter_from_graph(graph, &filter, i) < 0) { + fprintf(stderr, "missing Bloom filter for graph " + "position %"PRIu32"\n", i); + continue; + } + + for (j = 0; j < filter.len; j++) + printf("%02x", filter.data[j]); + if (filter.len) + printf("\n"); + } +} + +int cmd__read_graph(int argc, const char **argv) { struct commit_graph *graph = NULL; struct object_directory *odb; + int ret = 0; setup_git_directory(); odb = the_repository->objects->odb; @@ -58,14 +80,24 @@ int cmd__read_graph(int argc UNUSED, const char **argv UNUSED) prepare_repo_settings(the_repository); graph = read_commit_graph_one(the_repository, odb); - if (!graph) - return 1; + if (!graph) { + ret = 1; + goto done; + } - dump_graph_info(graph); + if (argc <= 1) + dump_graph_info(graph); + else if (!strcmp(argv[1], "bloom-filters")) + dump_graph_bloom_filters(graph); + else { + fprintf(stderr, "unknown sub-command: '%s'\n", argv[1]); + ret = 1; + } +done: UNLEAK(graph); - return 0; + return ret; } From patchwork Wed Jul 19 17:55:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13319309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8A85C001E0 for ; Wed, 19 Jul 2023 17:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbjGSR4C (ORCPT ); Wed, 19 Jul 2023 13:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbjGSRzz (ORCPT ); Wed, 19 Jul 2023 13:55:55 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880E91FCD for ; Wed, 19 Jul 2023 10:55:54 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5701e8f2b79so75390647b3.0 for ; Wed, 19 Jul 2023 10:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1689789353; x=1692381353; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=WsXApdL/BEiMg9Mv8Z6UigEeVhsNWnyFPeatoWo8c7g=; b=I61RQVW5J0WXuCa4PjTLChSRzuaO5rAZpZ3r+fl7QoJVPuHOjVhFYPY/z15yuPHPqG FaMP3oIWkmR0P8aSfgZeHOYRQApLoD28k+WAgr6pvVA60ca3BDDNhAvjig759pr4DuVe JuNSwBPxSzQWvgAOQAoBnMKJXXEyag8d78F6khBWr70tfFrghpz8kItc6hpep8ztb43j z+aMJtTmhodoSxubdTkLdl/MZdqd48XUEKpfNCzh5jujmk9YWskC7V1CgJlBbe3nyzgN nHwFR/K6vy4jdoqWWwH6xka1cXUJRUEgYO3/SkZxjnkat9sp0HnPoWpLVUjiFogx7X96 8uPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689789353; x=1692381353; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WsXApdL/BEiMg9Mv8Z6UigEeVhsNWnyFPeatoWo8c7g=; b=BJuhNGf/tTHsZDdDrC2dSB3weCIBGL/+63Q6p26EwUzSDC3y1BSBXGeN/ZXlq/WcqG q0J9pfPeCLut6BftAyU+HLGB3Tgqis1jUhIct4E4rDBg8gg02oNJSTBRp6RPG/u3mWsz fkEF15ubg55CNT4fPhgiHkSMctE5jRCmrM/gOV/H/cCKSedILThA07lT5Sv5DypFSfMF yUGAJanx7fY8dgX1QI+PJJVDIb7MDqnMP2vmWruebuAxL/FFo1XJivg2+xbgAzn185or H7JBSSDZxmD8bpXz+E4y7UYZCJ0vKYR8xb3F1I+OmkNFSdu9/6boVCAyO5nGu5H5PRK8 tH9A== X-Gm-Message-State: ABy/qLZ18ppAMpOnMACeeYcgHHqkPZOBfYPDHGIF6Lg4WyZb5TwNuGTr k1eKo5ggf8MNzbY0i9CmcVj/BLq8B2BAdm5UC+1KgQ== X-Google-Smtp-Source: APBJJlHlQ6wNvN2VQjSB14Pm5G6BoitZudY/T2+V8QzoqviedNnIYrgzXnbLgCDpxigZjVQ3ewTw2A== X-Received: by 2002:a81:8315:0:b0:579:f5e3:ad07 with SMTP id t21-20020a818315000000b00579f5e3ad07mr3576384ywf.14.1689789353495; Wed, 19 Jul 2023 10:55:53 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id i65-20020a819144000000b00577466cc1f8sm1120215ywg.108.2023.07.19.10.55.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 10:55:53 -0700 (PDT) Date: Wed, 19 Jul 2023 13:55:52 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Jonathan Tan , Derrick Stolee , Junio C Hamano Subject: [PATCH 4/4] fixup! t4216: test changed path filters with high bit paths Message-ID: <5bac3bc2e5b85f553e39b9a334ead372d97eb753.1689789226.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Taylor Blau --- t/t4216-log-bloom.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh index 0cf208fdf55..c49528b947a 100755 --- a/t/t4216-log-bloom.sh +++ b/t/t4216-log-bloom.sh @@ -404,17 +404,9 @@ test_expect_success 'Bloom generation backfills empty commits' ' ) ' -get_bdat_offset () { - perl -0777 -ne \ - 'print unpack("N", "$1") if /BDAT\0\0\0\0(....)/ or exit 1' \ - .git/objects/info/commit-graph -} - get_first_changed_path_filter () { - BDAT_OFFSET=$(get_bdat_offset) && - perl -0777 -ne \ - 'print unpack("H*", substr($_, '$BDAT_OFFSET' + 12, 2))' \ - .git/objects/info/commit-graph + test-tool read-graph bloom-filters >filters.dat && + head -n 1 filters.dat } # chosen to be the same under all Unicode normalization forms @@ -428,7 +420,7 @@ test_expect_success 'set up repo with high bit path, version 1 changed-path' ' test_expect_success 'setup check value of version 1 changed-path' ' (cd highbit1 && - printf "52a9" >expect && + echo "52a9" >expect && get_first_changed_path_filter >actual && test_cmp expect actual) '