Re: Redirect "git" subcommand to itself?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 10:38 +0200 29 May 2015, Christian Neukirchen <chneukirchen@xxxxxxxxx> wrote:
Junio C Hamano <gitster@xxxxxxxxx> 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:

I've done the same as the original poster a few times myself, so awhile ago I added the following to my .gitconfig file:

[alias]
   git         = "!f() { git $@; }; f"

And this has worked for me.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]