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

Re: [PATCH v4 8/8] environment: move "warn_on_object_refname_ambiguity" into `struct repo_config_values`

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 2, 2026, 00:05 UTC
Message-ID
<xmqqtsrlztzu.fsf@gitster.g>
In-Reply-To
<20260601154211.82370-9-belkid98@gmail.com>
Olamide Caleb Bello <belkid98@gmail.com> writes:
Show 5 quoted lines
> @@ -684,11 +684,12 @@ static int get_oid_basic(struct repository *r, const char *str, int len,
>  	int refs_found = 0;
>  	int at, reflog_len, nth_prior = 0;
>  	int fatal = !(flags & GET_OID_QUIETLY);
> +	struct repo_config_values *cfg = repo_config_values(the_repository);

The theme of this topic, however, is to turn the process-wide global into per-repository setting, so it may appear to be a bit unrelated change, but the function already takes a repository instance, which may be different from the_repository. In the longer run, we definitely want to see this call pass 'r' instead of 'the_repository', after making sure that repo-config-values for repository 'r' has already been properly initialized in the program flow that leads here.

If we want to be conservative, keep the call passing the_repository, but leave an in-code comment

	/*
	 * NEEDSWORK: pass 'r' instead of the_repository after
	 * making sure that repo_config_values for 'r' does have
	 * the right value for the repository.
	 */
or something like that nearby.
Show 9 quoted lines
> diff --git a/submodule.c b/submodule.c
> index b1a0363f9d..f26235bbb7 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -898,12 +898,13 @@ static void collect_changed_submodules(struct repository *r,
>  	struct setup_revision_opt s_r_opt = {
>  		.assume_dashdash = 1,
>  	};
> +	struct repo_config_values *cfg = repo_config_values(the_repository);
Likewise.
There may be other places with the same issue I may have missed.
Previous: Olamide Caleb BelloNext: Olamide Caleb Bello
Message 46 of 72 in “repo_config_values: migrate more globals”
  1. 0/8 repo_config_values: migrate more globalsOlamide Caleb Bello, Mar 24, 2026
  2. 1/8 environment: move "trust_ctime" into `struct repo_config_values`Olamide Caleb Bello, Mar 24, 2026
  3. Karthik NayakApr 14, 2026
  4. Phillip WoodApr 14, 2026
  5. Junio C HamanoApr 14, 2026
  6. Karthik NayakApr 15, 2026
  7. Junio C HamanoApr 15, 2026
  8. Karthik NayakApr 15, 2026
  9. 2/8 environment: move "check_stat" into `struct repo_config_values`Olamide Caleb Bello, Mar 24, 2026
  10. Karthik NayakApr 14, 2026
  11. 3/8 environment: move `zlib_compression_level` into repo_config_valuesOlamide Caleb Bello, Mar 24, 2026
  12. Karthik NayakApr 14, 2026
  13. Bello OlamideApr 14, 2026
  14. 4/8 environment: move "pack_compression_level" into `struct repo_config_values`Olamide Caleb Bello, Mar 24, 2026
  15. 5/8 environment: move "precomposed_unicode" into `struct repo_config_values`Olamide Caleb Bello, Mar 24, 2026
  16. Karthik NayakApr 14, 2026
  17. 6/8 env: move "core_sparse_checkout_cone" into `struct repo_config_values`Olamide Caleb Bello, Mar 24, 2026
  18. 7/8 env: put "sparse_expect_files_outside_of_patterns" in `repo_config_values`Olamide Caleb Bello, Mar 24, 2026
  19. 8/8 env: move "warn_on_object_refname_ambiguity" into `repo_config_values`Olamide Caleb Bello, Mar 24, 2026
  20. Karthik NayakApr 14, 2026
  21. Bello OlamideApr 14, 2026
  22. 0/8 repo_config_values: migrate more globalsOlamide Caleb Bello, Apr 23, 2026
  23. 1/8 Revert "compat/posix: introduce writev(3p) wrapper"Olamide Caleb Bello, Apr 23, 2026
  24. 2/8 rust: we are way beyond 2.53Olamide Caleb Bello, Apr 23, 2026
  25. 3/8 doc: am: revert Message-ID trailer claimOlamide Caleb Bello, Apr 23, 2026
  26. 4/8 doc: am: correct to full --no-message-idOlamide Caleb Bello, Apr 23, 2026
  27. 5/8 CI: bump actions/checkout from 4 to 5 for rust-analysis jobOlamide Caleb Bello, Apr 23, 2026
  28. 6/8 gitglossary: fix indentation of sub-listsOlamide Caleb Bello, Apr 23, 2026
  29. 7/8 Hopefully the final tweak before -rc2Olamide Caleb Bello, Apr 23, 2026
  30. 8/8 Git 2.54-rc2Olamide Caleb Bello, Apr 23, 2026
  31. Bello OlamideApr 23, 2026
  32. 0/8 repo_config_values: migrate more globalsOlamide Caleb Bello, Jun 1, 2026
  33. 1/8 environment: move "trust_ctime" into `struct repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  34. 2/8 environment: move "check_stat" into `struct repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  35. 3/8 environment: move `zlib_compression_level` into `struct repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  36. Junio C HamanoJun 2, 2026
  37. Patrick SteinhardtJun 2, 2026
  38. Christian CouderJun 2, 2026
  39. Junio C HamanoJun 2, 2026
  40. 4/8 environment: move "pack_compression_level" into `struct repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  41. 5/8 environment: move "precomposed_unicode" into `struct repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  42. Junio C HamanoJun 1, 2026
  43. 6/8 environment: move "core_sparse_checkout_cone" into `struct repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  44. 7/8 environment: move "sparse_expect_files_outside_of_patterns" into `repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  45. 8/8 environment: move "warn_on_object_refname_ambiguity" into `struct repo_config_values`Olamide Caleb Bello, Jun 1, 2026
  46. Junio C HamanoJun 2, 2026
  47. 0/8 repo_config_values: migrate more globals variablesOlamide Caleb Bello, Jun 2, 2026
  48. 1/8 environment: move "trust_ctime" into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  49. 2/8 environment: move "check_stat" into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  50. 3/8 environment: move `zlib_compression_level` into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  51. 4/8 environment: move "pack_compression_level" into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  52. 5/8 environment: move "precomposed_unicode" into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  53. 6/8 environment: move "core_sparse_checkout_cone" into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  54. 7/8 environment: move "sparse_expect_files_outside_of_patterns" into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  55. 8/8 environment: move "warn_on_object_refname_ambiguity" into `struct repo_config_values`Olamide Caleb Bello, Jun 2, 2026
  56. 0/8 environment: move core config globals into repo_config_valuesOlamide Caleb Bello, Apr 23, 2026
  57. 1/8 environment: move "trust_ctime" into `struct repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  58. Tian YuchenMay 21, 2026
  59. Bello OlamideJun 1, 2026
  60. 2/8 environment: move "check_stat" into `struct repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  61. 3/8 environment: move `zlib_compression_level` into `struct repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  62. 4/8 environment: move "pack_compression_level" into `struct repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  63. 5/8 environment: move "precomposed_unicode" into `struct repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  64. Tian YuchenMay 15, 2026
  65. 6/8 env: move "core_sparse_checkout_cone" into `struct repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  66. 7/8 env: move "sparse_expect_files_outside_of_patterns" into `repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  67. 8/8 env: move "warn_on_object_refname_ambiguity" into `struct repo_config_values`Olamide Caleb Bello, Apr 23, 2026
  68. Junio C HamanoApr 26, 2026
  69. Bello OlamideApr 26, 2026
  70. Junio C HamanoMay 11, 2026
  71. Junio C HamanoJun 1, 2026
  72. Junio C HamanoJun 1, 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.