git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Neukirchen <chneukirchen@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Redirect "git" subcommand to itself?
Date: Fri, 29 May 2015 18:41:02 +0200	[thread overview]
Message-ID: <87r3pz49r5.fsf@gmail.com> (raw)
In-Reply-To: <xmqqsiafe6md.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Fri, 29 May 2015 08:38:34 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Christian Neukirchen <chneukirchen@gmail.com> writes:
>
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>>  * You can help yourself with something like this, I suppose:
>>>
>>>    [alias]
>>> 	git = "!sh -c 'exec git \"$@\"' -"
>>>
>>>    but I personally feel that it is too ugly to live as part of our
>>>    official suggestion, so please do not send a patch to add it as
>>>    a built-in alias ;-).
>>
>> So I thought I was clever, but this didn't work:
>>
>> % ln -s /usr/bin/git ~/bin/git-git  
>> % git git
>> fatal: cannot handle git as a builtin
>
> Why did you have to do that when I already gave an alias that works?

I was just toying around, and it would have been cute.

> Or didn't the alias work?

It does.  This seems to work just as well, and is easier:

	git = !git

Thanks,
-- 
Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org

  parent reply	other threads:[~2015-05-29 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  0:28 Redirect "git" subcommand to itself? Stefan Beller
2015-05-28  1:53 ` Junio C Hamano
2015-05-28  5:22   ` Jeff King
2015-05-29  8:38   ` Christian Neukirchen
2015-05-29 13:24     ` Aaron Schrab
2015-05-29 15:38     ` Junio C Hamano
2015-05-29 16:00       ` Stefan Beller
2015-05-29 16:41       ` Christian Neukirchen [this message]
2015-05-29 16:49         ` Junio C Hamano
2015-05-28 10:36 ` Konstantin Khomoutov
2015-05-28 13:11 ` Matthieu Moy

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=87r3pz49r5.fsf@gmail.com \
    --to=chneukirchen@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 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 NNTP newsgroup(s).