All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: drona <dronarajgyawali@gmail.com>
Cc: git@vger.kernel.org,  christian.couder@gmail.com
Subject: Re: [PATCH] repo-settings: move warn_on_object_refname_ambiguity to repo_settings
Date: Fri, 27 Feb 2026 14:37:48 -0800	[thread overview]
Message-ID: <xmqqtsv1ols3.fsf@gitster.g> (raw)
In-Reply-To: <20260227125654.249676-1-dronarajgyawali@gmail.com> (drona's message of "Fri, 27 Feb 2026 18:41:52 +0545")

drona <dronarajgyawali@gmail.com> writes:

> From: Dorna Raj Gyawali <dronarajgyawali@gmail.com>
>
> This flag (default: true) controls whether warnings are printed when
> disambiguating object names that match multiple refname prefixes.
> Move it from a global variable in environment.c to struct repo_settings
> to reduce global state.

I am not sure why this needs to be per-repository, though.  It is
very understandable if this were a per-user preference coming from
the ~/.gitconfig file, and then it makes a lot more sense to keep it
a process-wide global.

>  builtin/cat-file.c     |  6 +++---
>  builtin/pack-objects.c |  6 +++---
>  environment.c          |  1 -
>  environment.h          |  1 -
>  object-name.c          |  2 +-
>  repo-settings.c        | 10 ++++++++++
>  repo-settings.h        |  7 ++++++-
>  revision.c             |  6 +++---
>  submodule.c            |  6 +++---
>  9 files changed, 29 insertions(+), 16 deletions(-)

Even in a distant future where these files are used to implement a
long running multi-user multi-repository "git server", we would
probably want to create a per-user structure that holds personal
preference items and throw this variable in there, not in the
per-repository repo_settings struct.

So,... I dunno.

  reply	other threads:[~2026-02-27 22:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 12:56 [PATCH] repo-settings: move warn_on_object_refname_ambiguity to repo_settings drona
2026-02-27 22:37 ` Junio C Hamano [this message]
2026-02-28 14:02 ` [PATCH v2] v2: revert per-repo move + add clarifying comment drona

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtsv1ols3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=dronarajgyawali@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.