Subject: Re: [PATCH] Install built-ins as symlinks

From: Andreas Ericsson <[email-masked]>
Date: Tue, 11 Jul 2006 13:15:14 +0200

Alp Toker wrote:
> Doing this now will save headache in the long run, avoiding mismatched
> versions of installed utilities and dangling copies of removed or
> renamed git commands that still appear to work. It also makes screwups
> when packaging git or making system backups less likely.
> 
> BusyBox has been doing it this way for years.
> 

Git has been doing it for a couple of months, although it uses hardlinks 
instead of symlinks. Hardlinks are slightly faster and actually consume 
a little less hard-disk space, although the differences are so small you 
won't notice it unless you do several thousand invocations.

>  
>  $(BUILT_INS): git$X
> -	rm -f $@ && ln git$X $@
> +	ln -sf git$X $@
>  

The -f option to ln is not very portable, hence the "rm && ln" construct.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231