summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2009-02-24 09:58:16 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-25 06:46:31 +0100
commit6a0861a8a3295395238c8126c6e74c66b715c595 (patch)
tree0480aa15b967434eb68569a973ee9f5f9f89bb62 /Makefile
parentMerge git://git.bogomips.org/git-svn (diff)
downloadgit-6a0861a8a3295395238c8126c6e74c66b715c595.tar.xz
git-6a0861a8a3295395238c8126c6e74c66b715c595.zip
Install builtins with the user and group of the installing personality
If 'make install' was run with sufficient privileges, then the installed builtins in gitexecdir, which are either hardlinked, symlinked, or copied, would receive the user and group of whoever built git. With this commit the initial hardlink or copy is done from the installation tree and not the build tree to fix this. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b040a96e50..0675c43e73 100644
--- a/Makefile
+++ b/Makefile
@@ -1468,8 +1468,8 @@ endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
{ $(RM) "$$execdir/git-add$X" && \
- ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
- cp git-add$X "$$execdir/git-add$X"; } && \
+ ln "$$bindir/git$X" "$$execdir/git-add$X" 2>/dev/null || \
+ cp "$$bindir/git$X" "$$execdir/git-add$X"; } && \
{ for p in $(filter-out git-add$X,$(BUILT_INS)); do \
$(RM) "$$execdir/$$p" && \
ln "$$execdir/git-add$X" "$$execdir/$$p" 2>/dev/null || \