All of lore.kernel.org
 help / color / mirror / 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

* 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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.