From mboxrd@z Thu Jan 1 00:00:00 1970 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 9D6B7C43334 for ; Thu, 21 Jul 2022 21:47:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233766AbiGUVrq (ORCPT ); Thu, 21 Jul 2022 17:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbiGUVro (ORCPT ); Thu, 21 Jul 2022 17:47:44 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69D7D93C09 for ; Thu, 21 Jul 2022 14:47:43 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id b9so2909416pfp.10 for ; Thu, 21 Jul 2022 14:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=JgxrYMPqdoR2xMJZpxVsaoC5U/7/AIcHJ5KoiRoKP1o=; b=RwwDegtfhPcbNyVuzaJDDiTQtDStzAKLdCXyZqRjmPtBOTziAKC/2/gQWyc6egy2zx 1mNtf/OiN44K6pHa9c/5H9D7doi/RZqrL33fRfygSTTnxqbC6fkf0R7GSEurisGhSkT0 wQiOA33qOGGPuW/O38Qqzr1V09nqPSwnM6j3mC6K4rNa0PTSbIE+V0g6xxLQjhaUMH5U 1luRjQ/7FC50+WCv37V89xgzkJMsuxMP1yVHkg2xJXJu2dh6T6SZozF4Pu03wxDbsGgu RtVTOBYxzAlTNPMQRL8vbj1rlWf+pnnYIfph0qbV1pqu7LAixcGpkShvqWUVUJUMm9o8 i4zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=JgxrYMPqdoR2xMJZpxVsaoC5U/7/AIcHJ5KoiRoKP1o=; b=Lix23WNTXgILhuGPu+Zdzw/a38AiFjodWNEcpy1DxBJ8ujThmJnJc1lJ06KK2s97zS tyYjzMy+DnO3CDZuaew6zOBBrLfVO3ar1GC7QQ/ajyPEB/ORSZDL5wSighMWLlGbrjR/ kPyFIbpp/siTHJDPim9m6nJtGawQQ04p10lohC6Wfl08Tn5+NC+4tydeUucrggZySe9c r5JDtX2dX02gqEl0Z7W6jE33jvJTU7UgHwTrRR5ioAKrJ20Ch2MkbjVY7v39A8R3xhSD T0CbzlebeP7vRnjE/Jt+udCM+6XHeYIxTgOpBDE9fNV/HIz+/8Z+ariKu2vzgkfJFcTR mTUA== X-Gm-Message-State: AJIora9y1gutHYkb97qc9Szs3prA8/K2/BEXjzeKcavhGyYazZQ7I2Cz U66AC/yKYqZ7C7ZfGCZIfmZopw== X-Google-Smtp-Source: AGRyM1ssueVceX68j6lrklszefXLS/vkHbcI9UE4h/I/rYEInhby8z3QlzLRhrOZr/wcXXugxpOhaQ== X-Received: by 2002:a63:1245:0:b0:41a:29a3:aa31 with SMTP id 5-20020a631245000000b0041a29a3aa31mr327506pgs.583.1658440062769; Thu, 21 Jul 2022 14:47:42 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:fe53:c5fe:7cbc:be96]) by smtp.gmail.com with ESMTPSA id q29-20020aa7961d000000b0052b8240840dsm2333947pfg.145.2022.07.21.14.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 14:47:42 -0700 (PDT) Date: Thu, 21 Jul 2022 14:47:35 -0700 From: Josh Steadmon To: Derrick Stolee via GitGitGadget Cc: git@vger.kernel.org, gitster@pobox.com, me@ttaylorr.com, newren@gmail.com, avarab@gmail.com, dyroneteng@gmail.com, Johannes.Schindelin@gmx.de, Derrick Stolee Subject: Re: [PATCH v2 6/6] fetch: add 'refs/bundle/' to log.excludeDecoration Message-ID: Mail-Followup-To: Josh Steadmon , Derrick Stolee via GitGitGadget , git@vger.kernel.org, gitster@pobox.com, me@ttaylorr.com, newren@gmail.com, avarab@gmail.com, dyroneteng@gmail.com, Johannes.Schindelin@gmx.de, Derrick Stolee References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 2022.06.29 20:40, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > > When fetching from a bundle URI, the branches of that bundle are stored > in a different ref namespace: refs/bundles/. This namespace is intended > to assist with later 'git fetch' negotiations with a Git server, > allowing the client to advertise which data it already has from a bundle > URI. > > These references can be confusing for a user when they appear as a > decoration in 'git log' output. Add "refs/bundles/" to the multi-valued > log.excludeDecoration config value. This is similar to the way > "refs/prefetch/" is hidden by background prefetch operations in 'git > maintenance' as added by 96eaffebb (maintenance: set > log.excludeDecoration durin prefetch, 2021-01-19). > > Signed-off-by: Derrick Stolee > --- > Documentation/fetch-options.txt | 3 ++- > bundle-uri.c | 7 +++++++ > t/t5558-fetch-bundle-uri.sh | 12 +++++++++--- > 3 files changed, 18 insertions(+), 4 deletions(-) > > diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt > index 09bd1feeed8..8b801bcc2f3 100644 > --- a/Documentation/fetch-options.txt > +++ b/Documentation/fetch-options.txt > @@ -321,4 +321,5 @@ endif::git-pull[] > --bundle-uri=:: > Instead of fetching from a remote, fetch a bundle from the given > `` and unbundle the data into the local repository. The refs > - in the bundle will be stored under the `refs/bundle/*` namespace. > + in the bundle will be stored under the hidden `refs/bundle/*` > + namespace. > diff --git a/bundle-uri.c b/bundle-uri.c > index 4c793843a2a..6e0f1cb06fd 100644 > --- a/bundle-uri.c > +++ b/bundle-uri.c > @@ -1,6 +1,7 @@ > #include "cache.h" > #include "bundle-uri.h" > #include "bundle.h" > +#include "config.h" > #include "object-store.h" > #include "refs.h" > #include "run-command.h" > @@ -153,6 +154,12 @@ int fetch_bundle_uri(struct repository *r, const char *uri) > if ((result = unbundle_from_file(r, filename.buf))) > goto cleanup; > > + git_config_set_multivar_gently("log.excludedecoration", > + "refs/bundle/", > + "refs/bundle/", > + CONFIG_FLAGS_FIXED_VALUE | > + CONFIG_FLAGS_MULTI_REPLACE); > + I dislike the idea of modifying the user's config as a side effect here. Since it's a cosmetic issue, can we drop this patch and figure out better default values for log.excludedecoration? > cleanup: > unlink(filename.buf); > strbuf_release(&filename); > diff --git a/t/t5558-fetch-bundle-uri.sh b/t/t5558-fetch-bundle-uri.sh > index 919db6f4551..bed4cc3e99c 100755 > --- a/t/t5558-fetch-bundle-uri.sh > +++ b/t/t5558-fetch-bundle-uri.sh > @@ -28,7 +28,9 @@ test_expect_success 'fetch file bundle' ' > git -C fetch-to fetch --bundle-uri="$(pwd)/fetch-from/B.bundle" && > git -C fetch-to rev-parse refs/bundles/topic >actual && > git -C fetch-from rev-parse topic >expect && > - test_cmp expect actual > + test_cmp expect actual && > + > + test_config -C fetch-to log.excludedecoration refs/bundle/ > ' > > test_expect_success 'fetch file:// bundle' ' > @@ -36,7 +38,9 @@ test_expect_success 'fetch file:// bundle' ' > git -C fetch-file fetch --bundle-uri="file://$(pwd)/fetch-from/B.bundle" && > git -C fetch-file rev-parse refs/bundles/topic >actual && > git -C fetch-from rev-parse topic >expect && > - test_cmp expect actual > + test_cmp expect actual && > + > + test_config -C fetch-file log.excludedecoration refs/bundle/ > ' > > ######################################################################### > @@ -62,7 +66,9 @@ test_expect_success 'fetch HTTP bundle' ' > git -C fetch-http fetch --bundle-uri="$HTTPD_URL/B.bundle" && > git -C fetch-http rev-parse refs/bundles/topic >actual && > git -C fetch-from rev-parse topic >expect && > - test_cmp expect actual > + test_cmp expect actual && > + > + test_config log.excludedecoration refs/bundle/ > ' > > # Do not add tests here unless they use the HTTP server, as they will > -- > gitgitgadget