git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michal Aron <aronmgv@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Feature Request - GIT config - Reference value of init.defaultBranch in alias
Date: Thu, 26 Jan 2023 08:21:01 -0800	[thread overview]
Message-ID: <xmqqbkmlcln6.fsf@gitster.g> (raw)
In-Reply-To: <CAHoQa4-o-=pB4zPR-1SG96KB02rixQG23mFgh0H9ojWrQ_pREg@mail.gmail.com> (Michal Aron's message of "Thu, 26 Jan 2023 10:33:20 +0100")

Michal Aron <aronmgv@gmail.com> writes:

> 1) global config having init.defaultBranch = master
> 2) global config having alias com = checkout [ init.defaultBranch ]

I do not think it is a good idea to special case just a single
configuration variable and come up with a special syntax to refer to
it.

Isn't

  [alias]
	com = !git checkout $(git config init.defaultBranch)

sufficient?

      reply	other threads:[~2023-01-26 16:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26  9:33 Feature Request - GIT config - Reference value of init.defaultBranch in alias Michal Aron
2023-01-26 16:21 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbkmlcln6.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=aronmgv@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).