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.8 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 677E51F463 for ; Sat, 21 Dec 2019 03:08:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726613AbfLUDIt (ORCPT ); Fri, 20 Dec 2019 22:08:49 -0500 Received: from mail-vs1-f67.google.com ([209.85.217.67]:43461 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbfLUDIt (ORCPT ); Fri, 20 Dec 2019 22:08:49 -0500 Received: by mail-vs1-f67.google.com with SMTP id s16so5782506vsc.10 for ; Fri, 20 Dec 2019 19:08:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dsLlLtu3LMQatrkUdwuSlW1/QYNdG0tb+muhd6+blcQ=; b=hYF5bgr9GHJ6Eb7GqYy/ddd46+Nz326aYRmaj+aTa6WY2LFfut+VLKYHdiq7GRrbH3 Z9C0FwN0KgpW+jVZIGiEBCdL2ItSBKvogrZzn32kWRXQ3PU9YeR6c+cf3Q2Gx3d/BrxB CSMJBjtJFzTMjjdvi9a1yD+mS5cDGkcqh+hc8W6b/PvPhIMtuLXmVWv+yGCA41Yp4SFT 6H4fYcPXBzmKHlBjA6xT/13ykc+jGdC0i8Vj3uFSt5+1BDwLGM9dRkCAwwyTZK0gdY1p eJ8bMAstQX81zXHpOJHKJwmgoabGVuahtSoegeITs+kCRFksYGA6hOEIyiRt2IX7rIWa tq7Q== 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=dsLlLtu3LMQatrkUdwuSlW1/QYNdG0tb+muhd6+blcQ=; b=Y1HeL3IOLjA2UqkK+4AQu5IwWXVP+sxCB6EUcvtjVQFTXWdsb+dTvurzBlnUqTtahf 4EyhNVu6m9Jb4EujHLtQwWf2VDqpzNugOETGnh/ERUweSBEcBfK/AR6VVPA/X4NZM820 7C7lll5j7OAGWoUtRp3Vm++xLqDTn/MntY8IGFk2mxKEGJOYXR+SHKwsZMBlLCrO3Rdq kreQL1hYjbpIE9IMJg85xVQtCs1catNs9NbTsMDVYplnUhiMsNavWdvwzFixS+zsY8Z+ F1PDo0PrkiIWtYm53ENmAEgrpeSLxTw39+SC2GY0RCZzcdWFIhXfQOYDXoqJgpeD1yX+ nmSw== X-Gm-Message-State: APjAAAVKysaGTRLtidjGe5v6Sd6X0y4VKg3tMmNEcOp7vUBAKVPEEQmO nEM8X0w16s5hMr7l50cKveYN7Ce85vBN5luzoYeer6ujBLEGTg== X-Google-Smtp-Source: APXvYqzRGobshUvOgXsLTBVnso6mN15khAXbrq4x+/o+usmrJHJjmzN2zu57tgrAv3Xts4dt19YvpHuPT7FuR83ajlU= X-Received: by 2002:a67:e3b1:: with SMTP id j17mr5229415vsm.209.1576897728113; Fri, 20 Dec 2019 19:08:48 -0800 (PST) MIME-Version: 1.0 References: <9a91caa0-72c3-3a38-3eb7-55a43537762e@iee.email> <03b001d5b601$09b950e0$1d2bf2a0$@gmail.com> In-Reply-To: From: Matt Rogers Date: Fri, 20 Dec 2019 22:08:35 -0500 Message-ID: Subject: Re: [PATCH 1/1] config: allow user to know scope of config options To: Junio C Hamano Cc: Philip Oakley , Matthew Rogers via GitGitGadget , git@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Dec 20, 2019 at 9:37 PM Junio C Hamano wrote: > > I do not think origin and scope are orghogonal, though. Can the > same file appear as the source for different configuration var-value > pair in two different scopes? I meant orthogonal in two senses: That given the current implementation you don't need to have both options active at the same time but can have them active at both times. And that origin and scope correlate, but aren't necessarily one-for-one. For example, --show-origin lists in a known order, but it follows includes and lists the origin as the included file. so if you include a file globally which has includeif "gitdir:..." directives then it can get hairy when all your config files are structured like that. Although, to be fair I doubt that that kind of situation is normal > > It is likely that you can _guess_ with high precision that given a > pathname reported by --show-origin what scope it is in. It on the > other hand is not so trivial given a scope to guess which exact file > a var-value pair came from, I would think.\ Normally yes, but things can get complicating depending on your configuration/include situation.