From: Andreas Ericsson Date: Tue, 11 Jul 2006 11:15:14 GMT Subject: Re: [PATCH] Install built-ins as symlinks Message-ID: <44B38842.10609@op5.se> In-Reply-To: <11526131792377-git-send-email-alp@atoker.com> 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