08.05.2025 11:33, Kirill A. Korinsky пишет: > rovert@ had noticed that git out of the box uses as many threads as the > system has CUPs. claudio@ had pointed that it is quite bad idea and use an > example that ld.lld with -Wl,--threads=1 reduces the configure time by 15% > and system time by 40%. > > So, here the diff which replaces 0 threads to 1 by default where it isn't 1 > already, and disabled try to use threads in name-hashing.
Just ship a default config, sysmerge(8) takes care of existing files, if any. This is the system wide config, see git-config(1) for details. Feedback? OK? Index: Makefile =================================================================== RCS file: /cvs/ports/devel/git/Makefile,v diff -u -p -r1.285 Makefile --- Makefile 15 Mar 2025 16:15:15 -0000 1.285 +++ Makefile 8 May 2025 09:04:10 -0000 @@ -3,6 +3,7 @@ COMMENT-svn = subversion interoperabilit COMMENT-x11 = graphical tools V = 2.49.0 +REVISION-main = 0 DISTNAME = git-${V} CATEGORIES = devel @@ -117,6 +118,8 @@ TEST_ENV += GIT_TEST_CLONE_2GB=true # add the target generating it for now ALL_TARGET = all man +EXAMPLESDIR = ${PREFIX}/share/examples/${PKGSTEM-main} + post-extract: @mkdir -p ${WRKSRC}/doc ${TAR} -C ${WRKSRC}/doc -xzf ${FULLDISTDIR}/${DOC_DISTFILE} @@ -142,5 +145,7 @@ post-install: ${MODTCL_WISH_ADJ} ${PREFIX}/libexec/git/git-gui--askpass rm ${PREFIX}/bin/git-receive-pack # handled by gitwrapper rm ${PREFIX}/bin/git-upload-pack # handled by gitwrapper + ${INSTALL_DATA_DIR} ${EXAMPLESDIR}/ + ${INSTALL_DATA} ${FILESDIR}/gitconfig ${EXAMPLESDIR}/ .include <bsd.port.mk> Index: files/gitconfig =================================================================== RCS file: files/gitconfig diff -N files/gitconfig --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/gitconfig 8 May 2025 09:07:46 -0000 @@ -0,0 +1,7 @@ +# Do not hog all CPUs by default, less is more. +[grep] + threads = 1 +[index] + threads = 1 +[pack] + threads = 1 Index: pkg/PLIST-main =================================================================== RCS file: /cvs/ports/devel/git/pkg/PLIST-main,v diff -u -p -r1.118 PLIST-main --- pkg/PLIST-main 15 Mar 2025 16:15:15 -0000 1.118 +++ pkg/PLIST-main 8 May 2025 09:27:13 -0000 @@ -419,6 +419,9 @@ share/emacs/ share/emacs/site-lisp/ share/emacs/site-lisp/git-blame.el share/emacs/site-lisp/git.el +share/examples/git/ +share/examples/git/gitconfig +@sample ${SYSCONFDIR}/gitconfig share/git-core/ share/git-core/templates/ share/git-core/templates/description