Hi Duy,

On Tue, 11 Oct 2016, Duy Nguyen wrote:

> On Tue, Oct 11, 2016 at 4:44 PM, Johannes Schindelin
> <johannes.schinde...@gmx.de> 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

Reply via email to