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

Re: [PATCH 0/5] Introduce configs for default repo format

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 15, 2024, 21:52 UTC
Message-ID
<xmqq4j7lsbca.fsf@gitster.g>
In-Reply-To
<Zr5wODo8tgGtPEIM@tapette.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 22 quoted lines
> On 2024-08-15 at 15:24:47, shejialuo wrote:
>> If the user uses the following command:
>> 
>>   $ export GIT_DEFAULT_HASH_ENVIRONMENT=sha1
>>   $ git -c init.defaultObjectFormat=sha256 repo
>> 
>> The repo would be initialized with the sha1 algorithm. I think we should
>> think carefully which precedence should be higher. I cannot give an
>> answer here. I am not familiar with the whole database and do not the
>> concern. But from my own perspective, I think the precedence of the
>> config should be higher than the environment variable. This is a new
>> feature, the people who would like to use it, they will never use
>> environment variable and we should ignore the functionality of the
>> environment variable. But for people who do not know this feature, they
>> will continue to use the environment variable and they will never be
>> influenced by the configs.
>
> The standard behaviour we have with other environment variables is that
> they override the config, such as with `GIT_SSH_COMMAND` and
> `GIT_SSH_VARIANT`.  The reason is that the config in this case is
> usually per-user or per-system, but it's very common to override
> settings on an ephemeral basis with the environment.

Right. It is good that somebody can give a clear answer when a new person says they cannot and then give an answer that contradicts with an established practice ;-).

Previous: brian m. carlsonNext: Patrick Steinhardt
Message 14 of 24 in “Introduce configs for default repo format”
  1. 0/5 Introduce configs for default repo formatPatrick Steinhardt, Aug 15, 2024
  2. 1/5 t0001: exercise initialization with ref formats more thoroughlyPatrick Steinhardt, Aug 15, 2024
  3. Justin ToblerAug 15, 2024
  4. 2/5 t0001: delete repositories when object format tests finishPatrick Steinhardt, Aug 15, 2024
  5. 3/5 setup: merge configuration of repository formatsPatrick Steinhardt, Aug 15, 2024
  6. Justin ToblerAug 15, 2024
  7. Patrick SteinhardtAug 16, 2024
  8. 5/5 setup: make ref storage format configurable via configPatrick Steinhardt, Aug 15, 2024
  9. Justin ToblerAug 15, 2024
  10. 4/5 setup: make object format configurable via configPatrick Steinhardt, Aug 15, 2024
  11. Justin ToblerAug 15, 2024
  12. shejialuoAug 15, 2024
  13. brian m. carlsonAug 15, 2024
  14. Junio C HamanoAug 15, 2024
  15. Patrick SteinhardtAug 16, 2024
  16. brian m. carlsonAug 15, 2024
  17. 0/5 Introduce configs for default repo formatPatrick Steinhardt, Aug 16, 2024
  18. 2/5 t0001: delete repositories when object format tests finishPatrick Steinhardt, Aug 16, 2024
  19. 5/5 setup: make ref storage format configurable via configPatrick Steinhardt, Aug 16, 2024
  20. 3/5 setup: merge configuration of repository formatsPatrick Steinhardt, Aug 16, 2024
  21. 1/5 t0001: exercise initialization with ref formats more thoroughlyPatrick Steinhardt, Aug 16, 2024
  22. 4/5 setup: make object format configurable via configPatrick Steinhardt, Aug 16, 2024
  23. Junio C HamanoAug 16, 2024
  24. Justin ToblerAug 16, 2024

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.