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