git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] repo-settings: move warn_on_object_refname_ambiguity to repo_settings

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 27, 2026, 22:37 UTC
Message-ID
<xmqqtsv1ols3.fsf@gitster.g>
In-Reply-To
<20260227125654.249676-1-dronarajgyawali@gmail.com>
drona <dronarajgyawali@gmail.com> writes:
Show 6 quoted lines
> 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.

Show 10 quoted lines
>  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.
Previous: dronaNext: drona
Message 2 of 3 in “repo-settings: move warn_on_object_refname_ambiguity to repo_settings”
  1. repo-settings: move warn_on_object_refname_ambiguity to repo_settingsdrona, Feb 27, 2026
  2. Junio C HamanoFeb 27, 2026
  3. v2: revert per-repo move + add clarifying commentdrona, Feb 28, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.