All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jeff King <peff@peff.net>, Johannes Sixt <j6t@kdbg.org>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd
Date: Tue, 11 Oct 2016 17:53:23 +0700	[thread overview]
Message-ID: <CACsJy8Aufm7g9SnckiXbMCOOvsLMqESRHLR+Zd94HxPeJj=gTw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1610111142490.35196@virtualbox>

On Tue, Oct 11, 2016 at 4:44 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Sun, 9 Oct 2016, Jeff King wrote:
>
>> On Sun, Oct 09, 2016 at 06:32:38PM +0700, Duy Nguyen wrote:
>>
>> > > If you mean ambiguity between the old "alias.X" and the new "alias.X.*",
>> > > then yes, I think that's an unavoidable part of the transition.  IMHO,
>> > > the new should take precedence over the old, and people will gradually
>> > > move from one to the other.
>> >
>> > Do we really need to treat this differently than
>> >
>> > [alias]
>> >     d2u = !dos2unix
>> >     d2u = C:/cygwin/bin/dos3unix.exe
>> >
>> > ?
>> >
>> > Another similar case is one d2u (could be either old syntax or new) is
>> > defined in ~/.gitconfig and the other d2u in $GIT_DIR/config. In
>> > either case, the "latest" d2u definition wins.
>>
>> Yeah, that's reasonable, too. So:
>>
>>   [alias]
>>     d2u = "!dos2unix"
>>
>> acts exactly as if:
>>
>>   [alias "d2u"]
>>     command = dos2unix
>>     type = shell
>>
>> was specified at that point, which is easy to understand.
>
> It is easy to understand, and even easier to get wrong or out of sync. I
> really liked the ease of *one* `git config` call to add new aliases.

I was about to bring this up. Although to me, "git config --global
alias.foo bar" is more convenient, but not using it is not exactly
easy to get wrong or out of sync. For adding alias.$name.* I was
thinking about "git config --global --edit", not executing "git
config" multiple times.

> Not sure that I like the need for more such calls just to add *one* alias (one
> config call for "shell", one for "don't cd up", etc).

We could add git-alias if more alias types pop up (and in my opinion
git-alias is the right call, we've been abusing git-config for alias
manipulation for a long time).
-- 
Duy

  reply	other threads:[~2016-10-11 10:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 11:41 [PATCH/RFC] git.c: support "!!" aliases that do not move cwd Nguyễn Thái Ngọc Duy
2016-10-06 18:42 ` Junio C Hamano
2016-10-07 11:20   ` Johannes Schindelin
2016-10-07 12:27     ` Duy Nguyen
2016-10-07 12:47       ` Matthieu Moy
2016-10-07 13:07         ` Duy Nguyen
2016-10-07 14:12         ` Johannes Schindelin
2016-10-07 14:31           ` Matthieu Moy
2016-10-07 14:11       ` Johannes Schindelin
2016-10-07 14:20         ` Jeff King
2016-10-07 17:42       ` Johannes Sixt
2016-10-07 17:50         ` Jeff King
2016-10-08  8:36           ` Johannes Schindelin
2016-10-09  6:01             ` Jeff King
2016-10-09  6:08               ` Jeff King
2016-10-09 11:32               ` Duy Nguyen
2016-10-09 20:58                 ` Jeff King
2016-10-10 17:52                   ` Junio C Hamano
2016-10-10 18:21                     ` Jeff King
2016-10-10 19:07                       ` Junio C Hamano
2016-10-11  9:44                   ` Johannes Schindelin
2016-10-11 10:53                     ` Duy Nguyen [this message]
2016-10-11 11:28                       ` Johannes Schindelin
2016-10-11 15:01                     ` Jeff King
2016-10-26 13:23                       ` Duy Nguyen
2016-10-26 16:08                         ` Junio C Hamano
2016-10-07 13:31     ` Jakub Narębski
2016-10-07 14:19       ` Johannes Schindelin
2016-10-07 15:55         ` Jakub Narębski
2016-10-08  0:32           ` Duy Nguyen
2016-10-11 11:51             ` SZEDER Gábor
2016-10-11 13:24               ` Jakub Narębski
2016-10-06 19:00 ` Jeff King
2016-10-06 19:07   ` Jeff King

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='CACsJy8Aufm7g9SnckiXbMCOOvsLMqESRHLR+Zd94HxPeJj=gTw@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    /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.