Re: [PATCH] Install built-ins as symlinks
- From
Andreas Ericsson <ae@op5.se>
- Date
- Jul 11, 2006, 11:15 UTC
- Message-ID
- <44B38842.10609@op5.se>
- In-Reply-To
- <11526131792377-git-send-email-alp@atoker.com>
Alp Toker wrote:
Show 7 quoted lines
> 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.
Show 5 quoted lines
> > $(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