Re: [PATCH] Install built-ins as symlinks

From: Andreas Ericsson <ae@op5.se>
Date: 2006-07-11 21:15:14
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                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Jul 11 21:16:28 2006

This archive was generated by hypermail 2.1.8 : 2006-07-11 21:16:55 EST