]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Fix use of hardlinks in "make install"
authorAlex Riesen <raa.lkml@gmail.com>
Thu, 28 Aug 2008 13:57:32 +0000 (15:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 30 Aug 2008 05:37:04 +0000 (22:37 -0700)
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>
Makefile

index 588bf5aee5763a1e55aa6878166539987f83ec9f..b6df1e9d8b75e7f182ba67c9f9e4a41897598a34 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1370,7 +1370,7 @@ endif
        { $(RM) "$$execdir/git-add$X" && \
                ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
                cp git-add$X "$$execdir/git-add$X"; } && \
-       { $(foreach p,$(filter-out git-add,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
+       { $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
                ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
                ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
                cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \