git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix use of hardlinks in "make install"

From
Alex Riesen <raa.lkml@gmail.com>
Date
Aug 28, 2008, 14:04 UTC
Message-ID
<81b0412b0808280704h585b6cb4nf03e509de0159a91@mail.gmail.com>

The code tried to create a hardlink to the file ($execdir/git-add) it just removed, 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>
---
It created endless symlink loops on cygwin, but obviously nowhere else.
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
From 943e0824b9fd1a8c2798ae9fd341b6a9b7429cc1 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Thu, 28 Aug 2008 15:57:32 +0200
Subject: [PATCH] Fix use of hardlinks in "make install"

The code tried to create a hardlink to the file ($execdir/git-add) it just removed, 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>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index bf400e6..20a1704 100644
--- a/Makefile
+++ b/Makefile
@@ -1380,7 +1380,7 @@ endif
 		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" && \
-		ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
+		ln "git-add$X" "$$execdir/$p" || \
 		ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
 		cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \
 	./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
-- 
1.6.0.1.150.g8307.dirty
Next: Alex Riesen
Message 1 of 8 in “Fix use of hardlinks in "make install"”
  1. Fix use of hardlinks in "make install"Alex Riesen, Aug 28, 2008
  2. Alex RiesenAug 28, 2008
  3. Fix use of hardlinks in "make install"Alex Riesen, Aug 28, 2008
  4. Fix use of hardlinks in "make install"Alex Riesen, Aug 30, 2008
  5. Andreas FärberAug 30, 2008
  6. Alex RiesenAug 30, 2008
  7. Andreas FärberAug 30, 2008
  8. Alex RiesenAug 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.