@matheusbsbs / matheus-bagliano / commits / 4e3ae59ef6
Fork 0

Fix use of hardlinks in "make install"

The code failed to filter-out git-add properly on platforms were $X is not empty (ATM there is only one such a platform). Than it tried to create a hardlink to the file ($execdir/git-add) it just removed (because git-add is first in the BUILT_INS), so ln failed (but because stderr was redirected into /dev/null the error was never seen), and the whole install ended up using "ln -s" instead. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Riesen committed Aug 28, 2008 at 15:57 UTC 4e3ae59ef63475411f4c073ba3a1478b1ef73b9a
1 file changed +1 -1
Makefile
+1 -1
@@ -1370,7 +1370,7 @@ endif
1370 { $(RM) "$$execdir/git-add$X" && \
1371 ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
1372 cp git-add$X "$$execdir/git-add$X"; } && \
1373 - { $(foreach p,$(filter-out git-add,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
1373 + { $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
1374 ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
1375 ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
1376 cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \