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=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 1FC861F55B for ; Fri, 12 Jun 2020 12:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726253AbgFLMuO (ORCPT ); Fri, 12 Jun 2020 08:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgFLMuO (ORCPT ); Fri, 12 Jun 2020 08:50:14 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D817C03E96F for ; Fri, 12 Jun 2020 05:50:14 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id w20so3172670uaa.2 for ; Fri, 12 Jun 2020 05:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=RhGloVDHtOwo+Eql2Ttmzt5s7SgTKZTY4j1KmDpgwGk=; b=AIdjPDsF3MC6T8zzzeR5uH0cRHeVwkL1+7epwg2XATiXmoiFlavhlLqGjuupDnNXVF FYUcT774p5Kd76OMMAM1ZCfW2lgQEx932YGNhG/jdbQs11fVG5fU+03422PBKl3XPRNf tpm7rLjaU0HA8PkIoS5ONFLxup8VC37wc8EdrHpa+632i5IGarRRwdYmNhSmfX26ATo4 YMNnvDWizyO5GNqvczbj8X9nkTFD/9V15TRi2HustgYdauJGpcE4ZBebw3SXBuibIE6u AgJxnQwHtYx5zr0jOOSrsTUQmf6sulVSBLjTv+ODvYqNUz7ht8o+pNjDCNkevJ58qkFo t/KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=RhGloVDHtOwo+Eql2Ttmzt5s7SgTKZTY4j1KmDpgwGk=; b=MdyFEFss16EIoT4HRTEnWNRTJZZWlTlwicAYWe44J18BSJewdrI6N7YbNdCQu0OK8i uD/Yevm/BbFIZh/tGcohdUaQTqr81K0C+46E8TtSguPbr3Yw5iMWnbqvJU8yQIqYWSlG SxrYDidwrsZ9LKsKiX0bTcIwEkR0T691uJefp1UlxBGs4qEShYr3rcmhDw0Mnub7ChqF YNPPmIO8NGa+h8HXJSOfj0awafk9ok6FU6sOLdfcD+/02vnPdzaKoTEhVxvspyyqHUGF RiF7lwTs5zUgIwZsiHZJA5e7qCnsPZ1Pmc9eKErB8f7UZs6uwDrcssmlehq6XlxSCZOG Fp7w== X-Gm-Message-State: AOAM531tKxQQDX174ScEjrIrVmYBAT8J0RwQjTGePLa9DUvdmmoPZLw/ ABYfpRAGzw/Ch4rwfMkuDNs= X-Google-Smtp-Source: ABdhPJxVhEAXhKFaphOL25e687/D1GdUJit2L1YsLzvu2igD0v75VyMJugSSEXvioZH8H4m6hSV8Bw== X-Received: by 2002:ab0:2308:: with SMTP id a8mr9920372uao.88.1591966212783; Fri, 12 Jun 2020 05:50:12 -0700 (PDT) Received: from localhost (69.104.231.35.bc.googleusercontent.com. [35.231.104.69]) by smtp.gmail.com with ESMTPSA id m73sm935375vke.11.2020.06.12.05.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 05:50:11 -0700 (PDT) From: Junio C Hamano To: Johannes Schindelin Cc: Matt Rogers , "brian m. carlson" , Johannes Schindelin via GitGitGadget , Git Mailing List , don@goodman-wilson.com, stolee@gmail.com, Jeff King Subject: Re: Re* [PATCH 8/9] fast-export: respect the possibly-overridden default branch name In-Reply-To: (Johannes Schindelin's message of "Fri, 12 Jun 2020 14:03:22 +0200 (CEST)") References: <1efe848f2b029e572cea61cadcfe36b9d3797836.1591823971.git.gitgitgadget@gmail.com> <20200610233912.GU6569@camp.crustytoothpaste.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Date: Fri, 12 Jun 2020 05:50:11 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Johannes Schindelin writes: >> Subject: [PATCH] fast-export: do anonymize the primary branch name > > I like this approach a lot. Do you want me to integrate it into this patch > series, or rather have it as a stand-alone patch? I do not see any need for an off-series preparation step. Without configurable primary branch, keeping 'master' as 'master' used in the current code is an OK way to anonymize refs and still keep the primary line of development in the output identifyable. The "ref0" trick becomes necessary only when we introduce configurable primary; even though it would not hurt to switch to the "ref0" approach to anonymize-but-still-the-primary-is-identifiable early, it just is not necessary to do so. I'd say that we should take with two changes, - see if the "refname" matches the fully spelled primary branch name by asking repo_main_branch_name(repo, 0), instead of comparing with "refs/heads/master", and - if matches return "refs/heads/ref0" instead of "ref0". and replace your [PATCH 8/9] (or whichever the counterpart patch is in the rerolled series) with it. Thanks.