Skip to content

Commit 4e3ae59

Browse files
raalkmlgitster
authored andcommitted
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>
1 parent 3e073dc commit 4e3ae59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ endif
13701370
{ $(RM) "$$execdir/git-add$X" && \
13711371
ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
13721372
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" && \
13741374
ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
13751375
ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
13761376
cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \

0 commit comments

Comments
 (0)