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

Re: [PATCH 2/3] setup: fix reinit of repos with incompatible GIT_DEFAULT_REF_FORMAT

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2025, 14:01 UTC
Message-ID
<xmqqikpryvnm.fsf@gitster.g>
In-Reply-To
<Z6BUOs7k1rzGOGTN@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> So from my point of view we should treat the environment variables the
> same as we treat "init.defaultRefFormat" and "init.defaultObjectFormat".
> Those indicate defaults, but do not cause us to change the format of
> existing repostiories.
Hmph, as somebody who often does things like
    $ GIT_EDITOR=: git do-something
    $ GIT_AUTHOR_NAME=foo GIT_AUTHOR_EMAIL=bar@baz git commit -a

I do not necessarily see the environment variables as replacement for configured defaults. They are, at least to me, more like a single-shot override of the configured defaults, so if we were to complain and error out command line options (we do do so, don't we?), I would expect the environment variable that gives a single-shot setting to be treated the same way.

Thanks.
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 9 of 11 in “setup: fix reinit of repos with different formats”
  1. 0/3 setup: fix reinit of repos with different formatsPatrick Steinhardt, Jan 30, 2025
  2. 1/3 t0001: remove duplicate testPatrick Steinhardt, Jan 30, 2025
  3. 3/3 setup: fix reinit of repos with incompatible GIT_DEFAULT_HASHPatrick Steinhardt, Jan 30, 2025
  4. Junio C HamanoJan 31, 2025
  5. 2/3 setup: fix reinit of repos with incompatible GIT_DEFAULT_REF_FORMATPatrick Steinhardt, Jan 30, 2025
  6. Junio C HamanoJan 30, 2025
  7. Junio C HamanoJan 31, 2025
  8. Patrick SteinhardtFeb 3, 2025
  9. Junio C HamanoFeb 3, 2025
  10. Patrick SteinhardtFeb 3, 2025
  11. brian m. carlsonJan 30, 2025

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.