From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id C7064207EC for ; Tue, 11 Oct 2016 11:28:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752355AbcJKL2v (ORCPT ); Tue, 11 Oct 2016 07:28:51 -0400 Received: from mout.gmx.net ([212.227.15.19]:56297 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752225AbcJKL2u (ORCPT ); Tue, 11 Oct 2016 07:28:50 -0400 Received: from virtualbox ([37.24.142.40]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LvEZe-1auhoE0TMQ-010ISl; Tue, 11 Oct 2016 13:28:20 +0200 Date: Tue, 11 Oct 2016 13:28:18 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Duy Nguyen cc: Jeff King , Johannes Sixt , Junio C Hamano , Git Mailing List Subject: Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd In-Reply-To: Message-ID: References: <20161006114124.4966-1-pclouds@gmail.com> <0347de20-72a7-b384-389f-4b2ad5789973@kdbg.org> <20161007175052.sxyk7y2ytjh36phr@sigill.intra.peff.net> <20161009060149.voqjoiltqi6jub7g@sigill.intra.peff.net> <20161009205854.byq2wqgemtmwudfb@sigill.intra.peff.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/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RzRLhQV/kHqeLJL5sA53NoXe6SPB1tw vV27FxL Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Duy, On Tue, 11 Oct 2016, Duy Nguyen wrote: > On Tue, Oct 11, 2016 at 4:44 PM, Johannes Schindelin > wrote: > > > > 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. Right, but many of my aliases get set by scripts, so your `--edit` idea won't work for me. > > 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). Maybe. It is also possible that this issue is a good indicator that we are complicating things [*1*] more than necessary... Ciao, Dscho Footnote *1*: http://thedailywtf.com/articles/The_Complicator_0x27_s_Gloves