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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id EBBEF1F466 for ; Mon, 20 Jan 2020 13:14:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726819AbgATNOh (ORCPT ); Mon, 20 Jan 2020 08:14:37 -0500 Received: from mail-vk1-f195.google.com ([209.85.221.195]:43871 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbgATNOg (ORCPT ); Mon, 20 Jan 2020 08:14:36 -0500 Received: by mail-vk1-f195.google.com with SMTP id h13so8527504vkn.10 for ; Mon, 20 Jan 2020 05:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a/PlEKVmJXCHxcB4dQPR7tpVClouxPV3wDPMW+Zm3Rw=; b=LMzynUGgiNAYylijqg8m/R9hVt+hijqkDlp+d794iAXG6UnogY7KlaWU0YERf5SlrT KmPJ9XlLzsJs/YFL2JS5jgOA+WxltRm8Z+AmzntXQNNmICABGj1V+LLSr4qznBj2JGLM kj3JO1ZAfO2EHJTXf4aq+/kKVuWYcyEWDHPDIcprJ1L86LICkMxitaxvO6aLa5yTuGHj trnPHVSPz5VfzMeKOPBgnGXIWvZMPEhz6qjTy9otff5gkRlIttyjCZ7vcgHTOYlUsurY Pbu9KLy7Hdn4tn2evLCIfJ9K2WN+kloBV0T9Zy2ssj9jhh0UoVJ2zUGZ8dWLOw/fxnFc cB3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a/PlEKVmJXCHxcB4dQPR7tpVClouxPV3wDPMW+Zm3Rw=; b=qrbrl0slMImhwp2PwG51sdBSV20AhFHruH/wVQvZKxZuPuWPjNgk3KDOLNCF7MVTtK KjMQbX2hTTRmR7Qgx/+z8QoAP5audtg0r0oGZoCsBuqyFxiZHaYnxqCJkBmHCAGcqns8 ogsTlIzRMgMtZXutMDGsinlMjb3T/zrtaZpgbXaqzvcRBoAr171Bpeb3atK0cx+iyI/q S58ERuJr454mWiJEta5zOd2bvOVC4/AztnxNs1A+QZQVgPHaaPz8TodVlmuwomsA/en0 h5j6tqfXE5EDJPjAFrmWTn0GodpALv9XeJdBO4QTVBiodfxXfdmYQUhNJHrDr5hotM3E s7KQ== X-Gm-Message-State: APjAAAU1KjzBI44nmKAp0HLgvTasJImNP/jcR68iUOuN8PcLQ3F4TgNX PtCyu8YNkj9uhQPl1s4TdgZCEQn2J3dFoDAxRu4= X-Google-Smtp-Source: APXvYqx3lXZYP3baoaCVOSyq1Knjiq3WtrelR6ein00bED3rMtX/9Jbh0aJ3LJrVKfOC0cC35M7v9HVpbuvRy1Ll1/M= X-Received: by 2002:a1f:434b:: with SMTP id q72mr822368vka.53.1579526075454; Mon, 20 Jan 2020 05:14:35 -0800 (PST) MIME-Version: 1.0 References: <5a8791ef1e262d2078a4ca26b87bfbd777bd4432.1579209398.git.bert.wesarg@googlemail.com> In-Reply-To: From: Bert Wesarg Date: Mon, 20 Jan 2020 14:14:23 +0100 Message-ID: Subject: Re: [PATCH v2] remote rename: rename branch..pushRemote config values too To: Johannes Schindelin Cc: Git Mailing List , Junio C Hamano Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Dscho, On Mon, Jan 20, 2020 at 12:25 PM Johannes Schindelin wrote: > > Hi Bert, > > On Fri, 17 Jan 2020, Bert Wesarg wrote: > > > On Fri, Jan 17, 2020 at 2:30 PM Johannes Schindelin > > wrote: > > > > > > On Fri, 17 Jan 2020, Bert Wesarg wrote: > > > > > > > On Fri, Jan 17, 2020 at 12:50 PM Johannes Schindelin > > > > wrote: > > > > AFAIU, the value of remote.pushDefault wont be renamed yet. So you > > > > suggest to issue a warning in case remote.pushDefault is X. But as X > > > > does not exists anymore after the rename, the value of > > > > remote.pushDefault is invalid. So why not rename it too? > > > > > > If this setting was usually a repository-specific one, I would suggest to > > > change its value, too. But it is my understanding that this might be set > > > in `~/.gitconfig` more often than not, so I recommend a warning instead. > > > > than why not rename it, if its a repository-specific setting and warn > > if it is a global one? If this is detectable at all. > > Sure, but you might need to re-parse the config to detect that (and you > have to use `git_config_from_file()` to make sure that you know that you > are looking at the repository config and not at anything else). I found current_config_scope() which serves the purpose for me. Anything wrong with this approach? Best, Bert > > Ciao, > Dscho