Subject: Re: [PATCH] Make git-k an alias to gitk

From: Johannes Sixt <[email-masked]>
Date: Wed, 30 May 2007 09:06:26 +0200

Johannes Schindelin wrote:
> 
> Signed-off-by: Johannes Schindelin <[email-masked]>
> ---
> 
> On Tue, 29 May 2007, Nguyen Thai Ngoc Duy wrote:
> 
>         > On 5/29/07, Johannes Sixt <[email-masked]> wrote:
>         > > pointy..clicky..pointy..clicky  (aka: cp gitk git-k)
>         > >
>         > > $ git k
>         > >
>         > > :)
>         >
>         > Maybe we should teach git.c to try gitk if git-k is not found ;)
> 
>         Something like this?
> 
> +static int cmd_gitk(int argc, const char **argv, const char *prefix)
> +{
> +       return execv("gitk", (char *const *)argv);
> +}
> +

This does not work. Windows's execv() does not know how to invoke shell
(or tcl) scripts. Only execve() does, because we have our own
implementation.

I'd prefer to install gitk under both names gitk and git-k (as hard
links; which would amount to copies on Windows, but we don't care).

-- Hannes