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

Re: [PATCH] builtin: add git-default-branch command

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 3, 2021, 23:44 UTC
Message-ID
<nycvar.QRO.7.76.6.2111040040340.56@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqy2656tni.fsf@gitster.g>
Hi Junio,
On Wed, 3 Nov 2021, Junio C Hamano wrote:
Show 7 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > But we do have prior art in Git how to display similar information: `git
> > var -l` will list e.g. `GIT_PAGER`, even if it is not configured
> > explicitly.
>
> Nice.  I was hoping that somebody would remember this one.
I am glad that at least you remembered what I said ;-)
> GIT_AUTHOR_IDENT and such that do not even exist as a variable is
> part of "git var -l"; the name for the default initial branch falls
> into the same category.

Yep. Likewise, `GIT_PAGER` does not have to exist as an environment variable, and still would be listed in `git var -l`. And `GIT_EDITOR`. I know there are scripts out there looking at `git var` for such (possibly default) values. That's why `git var -l` is a pretty good place for this information. Maybe the commit message could grow a paragraph with this line of reasoning. Thomas, what do you think?

Ciao, Dscho

Previous: Junio C Hamano
Message 18 of 18 in “builtin: add git-default-branch command”
  1. builtin: add git-default-branch commandThomas Weißschuh, Oct 30, 2021
  2. Ævar Arnfjörð BjarmasonOct 30, 2021
  3. Johannes SchindelinNov 2, 2021
  4. var: add GIT_DEFAULT_BRANCH variableThomas Weißschuh, Nov 2, 2021
  5. Ævar Arnfjörð BjarmasonNov 2, 2021
  6. Thomas WeißschuhNov 2, 2021
  7. Ævar Arnfjörð BjarmasonNov 2, 2021
  8. Thomas WeißschuhNov 2, 2021
  9. Jeff KingNov 3, 2021
  10. Eric SunshineNov 3, 2021
  11. Junio C HamanoNov 3, 2021
  12. var: add GIT_DEFAULT_BRANCH variableThomas Weißschuh, Nov 3, 2021
  13. Eric SunshineNov 3, 2021
  14. Junio C HamanoNov 3, 2021
  15. var: add GIT_DEFAULT_BRANCH variableThomas Weißschuh, Nov 3, 2021
  16. Junio C HamanoNov 3, 2021
  17. Junio C HamanoNov 3, 2021
  18. Johannes SchindelinNov 3, 2021

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.