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>
Gerrit Pape committed
Feb 24, 2009 at 08:58 UTC
6a0861a8a3295395238c8126c6e74c66b715c595
1 file changed
+2
-2
Makefile
+2
-2
@@ -1468,8 +1468,8 @@ endif
1468
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
1469
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
1470
{ $(RM) "$$execdir/git-add$X" && \
1471
- ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
1472
- cp git-add$X "$$execdir/git-add$X"; } && \
1471
+ ln "$$bindir/git$X" "$$execdir/git-add$X" 2>/dev/null || \
1472
+ cp "$$bindir/git$X" "$$execdir/git-add$X"; } && \
1473
{ for p in $(filter-out git-add$X,$(BUILT_INS)); do \
1474
$(RM) "$$execdir/$$p" && \
1475
ln "$$execdir/git-add$X" "$$execdir/$$p" 2>/dev/null || \