From patchwork Mon Sep 21 22:28:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11791245 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8402E16BC for ; Mon, 21 Sep 2020 22:28:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6657D23A65 for ; Mon, 21 Sep 2020 22:28:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RsqmIFbx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728554AbgIUW2W (ORCPT ); Mon, 21 Sep 2020 18:28:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726457AbgIUW2V (ORCPT ); Mon, 21 Sep 2020 18:28:21 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94D24C061755 for ; Mon, 21 Sep 2020 15:28:21 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id b79so1158564wmb.4 for ; Mon, 21 Sep 2020 15:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=uV6nip7fkrMMbddQ2fp7UKuaRL1b7PYVD0dXMSsFnFU=; b=RsqmIFbxJr4dOKfhywiR3QS2KssuBM5j8jL2IDHf+hKnwAfragBrDM//QEtf+5iMDz WCS5VH8b8TupKarjBh8DakMVQwxLb2m5yuE5vStjIDlMfT7TfsPmJwm34Rgjrt1QMkFt /u76wvG9EP3R7IRBb04doCnCs9hi0UyV5T5o1gqgUVy206IAv2NnWimLQmuUUjx9IjDA tAtBmjnsPXMeO3iBXmRZFl9gj3GBcqxABwOmPaOPOtwsJqbfYAAM1t9fgRNaMscoFcap M3pSzU0ExJYhucIo00ArCXiVC6jREYlyCsA8WWOA58bESLrojSjbWUHhbvQUBpZGyXZo nRAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=uV6nip7fkrMMbddQ2fp7UKuaRL1b7PYVD0dXMSsFnFU=; b=jgLJsDA7NEwqDc21z7qSt2L28zJD5Pt+LmQfkFHKszarIrIqEfGrl5RZ3m8XYWJ9Zr Vrvmeq12u0a5FJ2UCWKBeoCmppvNdMS2fMiGqUu3U7Di3rpZuc/ZREXFCPacVX6RMWpI iAYLR09wySyguhTQvvSDEgrz1Hg6iyK4ft9z55zHxfs8ncnmx5kkHEGYw7xpwJ/SmANI F/eNY618M679tpjSCpofyzNoirVM6GikI6qvOEFAbeCslzYTD6MaNTSOBapN+UcuYMfv D6FPuFlEY3tt2fwYcCQNLE7zseKxrIQIF6vBJNpSw4sSHjeq4ApFAshfMBsv1ka04GzL Sgbg== X-Gm-Message-State: AOAM532HWaF8rNhCda6H5kSYnWbTMMG3kmMg3545Ya7w0eAOObKNFt3u TRsPRLqxmv4SPdXeZimUgQCsjn/fpzs= X-Google-Smtp-Source: ABdhPJzooLQJUhQCR8xMvdfIDTx2SnBC2+5Oh4FgdThVaORshCb83yLjZXvdqF9y2DgaK4LmrkZGTw== X-Received: by 2002:a7b:ca4a:: with SMTP id m10mr1369397wml.11.1600727300105; Mon, 21 Sep 2020 15:28:20 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 18sm1306942wmj.28.2020.09.21.15.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 15:28:19 -0700 (PDT) Message-Id: <5df767c9190b70f91a982c6eacec34aa4ef32bbc.1600727297.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 21 Sep 2020 22:28:15 +0000 Subject: [PATCH v4 1/3] msvc: copy the correct `.pdb` files in the Makefile target `install` Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: SZEDER =?utf-8?b?R8OhYm9y?= , Johannes Schindelin , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin There is a hard-coded list of `.pdb` files to copy. But we are about to introduce the `SKIP_DASHED_BUILT_INS` knob in the `Makefile`, which might make this hard-coded list incorrect. Let's switch to a dynamically-generated list instead. Signed-off-by: Johannes Schindelin --- Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index f1b1bc8aa0..ce072c4fb8 100644 --- a/Makefile +++ b/Makefile @@ -2921,15 +2921,8 @@ ifdef MSVC # have already been rolled up into the exe's pdb file. # We DO NOT have pdb files for the builtin commands (like git-status.exe) # because it is just a copy/hardlink of git.exe, rather than a unique binary. - $(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' - $(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' - $(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' - $(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' - $(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' - $(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' - $(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' + $(INSTALL) $(patsubst %.exe,%.pdb,$(filter-out $(BUILT_INS),$(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)))) '$(DESTDIR_SQ)$(bindir_SQ)' + $(INSTALL) $(patsubst %.exe,%.pdb,$(filter-out $(BUILT_INS) $(REMOTE_CURL_ALIASES),$(PROGRAMS))) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' ifndef DEBUG $(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)' $(INSTALL) $(vcpkg_rel_bin)/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)' From patchwork Mon Sep 21 22:28:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11791253 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37BF76CA for ; Mon, 21 Sep 2020 22:28:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B76023A65 for ; Mon, 21 Sep 2020 22:28:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bNhNkHrx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728565AbgIUW2Z (ORCPT ); Mon, 21 Sep 2020 18:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726457AbgIUW2W (ORCPT ); Mon, 21 Sep 2020 18:28:22 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 829F1C061755 for ; Mon, 21 Sep 2020 15:28:22 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id a17so14679926wrn.6 for ; Mon, 21 Sep 2020 15:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=ewoqmQjhDhUdHufb+JGMSOeZBsePINNJlejOyJBct50=; b=bNhNkHrxV+9O9IF75P2iATIwdIMeKcIVKaGUWgT/+oQ7dRgK+DQBh1oa3sdAgq+zSG KHAV+NpAcbWRsEVf8Rng8vjmZ4cdCGJpr0IioG0pIXYKsDFW1YWpgWj9fiA/Cw+SzYbn IobmtAKvQmJJxyC3LHi4SpjTRHk2I0hiyik6aN5NLHDwSVUUzllobX7nDUjBd1D/V37m BZkXTWuTIlfqsYKALv4OjlcX3t7epRGl/5ZtAQKq0vMD4TPq/inp4LO6zZYvERHzpQXr TQZCgd+A9IuTmzZqbb1XYoKAHsYKCqkBA/2zUUwF6M4JneHRSBSWMdDMRzrTAojW+ujU QRPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=ewoqmQjhDhUdHufb+JGMSOeZBsePINNJlejOyJBct50=; b=UnFMz+xrvpTvwYSb5w+Lo11AQCpnfSUmjcJG3C0nYMtcKL9VNM8x5zNQLcvK7+ohhl lDs679B6SCmSjzUAyTVG0ts1qexBIM+FW64zZ9+eSS/BWTJjomuhhd9SwCX0CdHyhBh/ 3ETOoYtvK1AGOM6f8GPipdH0aC063UIzeDBTiCYCZwGoeCKxKOtb/I0ZoosGmMs13VMq XCNajFueKwToxvM41mVcPzL8MtDS7pV51X6hPryCcVLoKdolC1RH7jqzqiMIx4/nQ3b0 p0CFwq92GDz3w5qCnlCjA9UJP35xm/LjwrP7baRf/raSQmTXaQarxMokIUy7V4JWSsnA 86TQ== X-Gm-Message-State: AOAM5305R2gC1rMYlmEbDhdJYggwMIJxOoqh1Mbx34dX7yrNrFeO1uGr k/6muIen+bonoYJzHBvnsnXiggvXUo8= X-Google-Smtp-Source: ABdhPJyazoNTP3dj8l1sskoxCvu9NzeOot+dFE3AwcskviR9X0ipM7oDv9E3EHKMnrY9yj0DrFcFmw== X-Received: by 2002:a5d:6ac9:: with SMTP id u9mr1902776wrw.46.1600727300937; Mon, 21 Sep 2020 15:28:20 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id a10sm1331527wmj.38.2020.09.21.15.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 15:28:20 -0700 (PDT) Message-Id: <14d6eeefbc997fd7e6cddab89788ccd2eb32b4bd.1600727297.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 21 Sep 2020 22:28:16 +0000 Subject: [PATCH v4 2/3] Optionally skip linking/copying the built-ins Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: SZEDER =?utf-8?b?R8OhYm9y?= , Johannes Schindelin , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin For a long time already, the non-dashed form of the built-ins is the recommended way to write scripts, i.e. it is better to call `git merge [...]` than to call `git-merge [...]`. While Git still supports the dashed form (by hard-linking the `git` executable to the dashed name in `libexec/git-core/`), in practice, it is probably almost irrelevant. However, we *do* care about keeping people's scripts working (even if they were written before the non-dashed form started to be recommended). Keeping this backwards-compatibility is not necessarily cheap, though: even so much as amending the tip commit in a git.git checkout will require re-linking all of those dashed commands. On this developer's laptop, this makes a noticeable difference: $ touch version.c && time make CC version.o AR libgit.a LINK git-bugreport.exe [... 11 similar lines ...] LN/CP git-remote-https.exe LN/CP git-remote-ftp.exe LN/CP git-remote-ftps.exe LINK git.exe BUILTIN git-add.exe [... 123 similar lines ...] BUILTIN all SUBDIR git-gui SUBDIR gitk-git SUBDIR templates LINK t/helper/test-fake-ssh.exe LINK t/helper/test-line-buffer.exe LINK t/helper/test-svn-fe.exe LINK t/helper/test-tool.exe real 0m36.633s user 0m3.794s sys 0m14.141s $ touch version.c && time make SKIP_DASHED_BUILT_INS=1 CC version.o AR libgit.a LINK git-bugreport.exe [... 11 similar lines ...] LN/CP git-remote-https.exe LN/CP git-remote-ftp.exe LN/CP git-remote-ftps.exe LINK git.exe BUILTIN git-receive-pack.exe BUILTIN git-upload-archive.exe BUILTIN git-upload-pack.exe BUILTIN all SUBDIR git-gui SUBDIR gitk-git SUBDIR templates LINK t/helper/test-fake-ssh.exe LINK t/helper/test-line-buffer.exe LINK t/helper/test-svn-fe.exe LINK t/helper/test-tool.exe real 0m23.717s user 0m1.562s sys 0m5.210s Also, `.zip` files do not have any standardized support for hard-links, therefore "zipping up" the executables will result in inflated disk usage. (To keep down the size of the "MinGit" variant of Git for Windows, which is distributed as a `.zip` file, the hard-links are excluded specifically.) In addition to that, some programs that are regularly used to assess disk usage fail to realize that those are hard-links, and heavily overcount disk usage. Most notably, this was the case with Windows Explorer up until the last couple of Windows 10 versions. See e.g. https://github.com/msysgit/msysgit/issues/58. To save on the time needed to hard-link these dashed commands, with the plan to eventually stop shipping with those hard-links on Windows, let's introduce a Makefile knob to skip generating them. Signed-off-by: Johannes Schindelin --- Makefile | 55 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index ce072c4fb8..6931ecd45e 100644 --- a/Makefile +++ b/Makefile @@ -348,6 +348,9 @@ all:: # Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or # copies to install built-in git commands e.g. git-cat-file. # +# Define SKIP_DASHED_BUILT_INS if you do not need the dashed versions of the +# built-ins to be linked/copied at all. +# # Define USE_NED_ALLOCATOR if you want to replace the platforms default # memory allocators with the nedmalloc allocator written by Niall Douglas. # @@ -774,6 +777,16 @@ BUILT_INS += git-whatchanged$X # what 'all' will build and 'install' will install in gitexecdir, # excluding programs for built-in commands ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) +ALL_COMMANDS_TO_INSTALL = $(ALL_PROGRAMS) +ifeq (,$(SKIP_DASHED_BUILT_INS)) +ALL_COMMANDS_TO_INSTALL += $(BUILT_INS) +else +# git-upload-pack, git-receive-pack and git-upload-archive are special: they +# are _expected_ to be present in the `bin/` directory in their dashed form. +ALL_COMMANDS_TO_INSTALL += git-receive-pack$(X) +ALL_COMMANDS_TO_INSTALL += git-upload-archive$(X) +ALL_COMMANDS_TO_INSTALL += git-upload-pack$(X) +endif # what 'all' will build but not install in gitexecdir OTHER_PROGRAMS = git$X @@ -2088,9 +2101,9 @@ profile-fast: profile-clean $(MAKE) PROFILE=USE all -all:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS +all:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS ifneq (,$X) - $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';) + $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';) endif all:: @@ -2950,7 +2963,7 @@ ifndef NO_TCLTK $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install endif ifneq (,$X) - $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) + $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) endif bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ @@ -2968,21 +2981,27 @@ endif } && \ for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ $(RM) "$$bindir/$$p" && \ - test -n "$(INSTALL_SYMLINKS)" && \ - ln -s "git$X" "$$bindir/$$p" || \ - { test -z "$(NO_INSTALL_HARDLINKS)" && \ - ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ - ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ - cp "$$bindir/git$X" "$$bindir/$$p" || exit; } \ + if test -z "$(SKIP_DASHED_BUILT_INS)"; \ + then \ + test -n "$(INSTALL_SYMLINKS)" && \ + ln -s "git$X" "$$bindir/$$p" || \ + { test -z "$(NO_INSTALL_HARDLINKS)" && \ + ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ + ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ + cp "$$bindir/git$X" "$$bindir/$$p" || exit; }; \ + fi \ done && \ for p in $(BUILT_INS); do \ $(RM) "$$execdir/$$p" && \ - test -n "$(INSTALL_SYMLINKS)" && \ - ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \ - { test -z "$(NO_INSTALL_HARDLINKS)" && \ - ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ - ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ - cp "$$execdir/git$X" "$$execdir/$$p" || exit; } \ + if test -z "$(SKIP_DASHED_BUILT_INS)"; \ + then \ + test -n "$(INSTALL_SYMLINKS)" && \ + ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \ + { test -z "$(NO_INSTALL_HARDLINKS)" && \ + ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ + ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ + cp "$$execdir/git$X" "$$execdir/$$p" || exit; }; \ + fi \ done && \ remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \ for p in $$remote_curl_aliases; do \ @@ -3076,7 +3095,7 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),) OTHER_PROGRAMS += $(shell echo *.dll t/helper/*.dll) endif -artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \ +artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \ GIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \ $(MOFILES) $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \ @@ -3171,7 +3190,7 @@ endif ### Check documentation # -ALL_COMMANDS = $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) +ALL_COMMANDS = $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) ALL_COMMANDS += git ALL_COMMANDS += git-citool ALL_COMMANDS += git-gui @@ -3211,7 +3230,7 @@ check-docs:: -e 's/\.txt//'; \ ) | while read how cmd; \ do \ - case " $(patsubst %$X,%,$(ALL_COMMANDS) $(EXCLUDED_PROGRAMS)) " in \ + case " $(patsubst %$X,%,$(ALL_COMMANDS) $(BUILT_INS) $(EXCLUDED_PROGRAMS)) " in \ *" $$cmd "*) ;; \ *) echo "removed but $$how: $$cmd" ;; \ esac; \ From patchwork Mon Sep 21 22:28:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11791249 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 489B2139A for ; Mon, 21 Sep 2020 22:28:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2978D23A5B for ; Mon, 21 Sep 2020 22:28:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S8G0vlk+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728571AbgIUW2Z (ORCPT ); Mon, 21 Sep 2020 18:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728560AbgIUW2X (ORCPT ); Mon, 21 Sep 2020 18:28:23 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FCB5C0613CF for ; Mon, 21 Sep 2020 15:28:23 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id a9so1170290wmm.2 for ; Mon, 21 Sep 2020 15:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=N1aKWXY0SAWuJiMsJidrglqsDE4gYGStmnyHDHPLyVg=; b=S8G0vlk+T4rQUlkxwRzBksBp6sCEMgMSnRd4vDfxOQsYL+DyEFzbChsEU2G9ubhG9T bk3Ug2f5YM3x6Y+fZXqC5p46Yp1NRp9x0CqeycN6zoliUfgvM5Z5GpbxiblfLvyU7Zlk nz1lNrl7m5tMNnw0uoJmQGROOqw2+RKfFxOzoU5/YAZSBbg7ztzUGsZt8DHOQs8t9YH2 a/1EDfzkWXzRuWAeZ7aiCP3Kdh9zfhyF3QhQtfOSOgVpAQuFZXC29a/aTlw8RVOx5KxA L+xHKyCL/BKjXEt1Z5qQEHKTBZYrvKV1C4k36WPuSWOAzG6UKEIoURH3sWN5VZcu1d0N a2hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=N1aKWXY0SAWuJiMsJidrglqsDE4gYGStmnyHDHPLyVg=; b=I/fo1stGBsBAosjGOQrqzflLFFio4nyOlMJpiR4/q1+M47CJzc21Th+RmeitHJRn2g TbP3RXBX+QTmyokEa1kIGoNfLRthx+mTLYsUhO/cbJfV+ZHshQU/zVYnOIhSKgES3wQy sDZ5H74aOwiow7lv1GK2IOl/D249pDTrbYxzIeznNn+7Xg/M+S8HWdOAsyf/EGgsInQn CgDubSz+Be5AZL55+emqn9ihNDXHfFnW8ja/DDdDl29vP3yNqzcOZjS5/Y7hHkNLKsSL 3EnKDjhTcVrekHgiuUm9ImTyesdAIp1YZEJqIe+ejgqxFzM1kONPMq47CFYMTZngJSzJ QMeg== X-Gm-Message-State: AOAM531rRpg+6pq2BSX2/Q7d23mm97AohNUK+xVttsj2/4NqL5sjcH5d P1GOKb0C3oIz2vnkREPAUdlrV9lQ4Ew= X-Google-Smtp-Source: ABdhPJxuLHg68Yi5h37jDBgzvXLiaRU+PEe5IqnHRJtcxoHp6uDJEVpk8wZWzM3gvBifL7zoDZy9og== X-Received: by 2002:a1c:544c:: with SMTP id p12mr1379951wmi.170.1600727301770; Mon, 21 Sep 2020 15:28:21 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id c4sm23948265wrp.85.2020.09.21.15.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 15:28:21 -0700 (PDT) Message-Id: <1fdf24af368ccb263ade2af2e482221280a3eb06.1600727298.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 21 Sep 2020 22:28:17 +0000 Subject: [PATCH v4 3/3] ci: stop linking built-ins to the dashed versions Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: SZEDER =?utf-8?b?R8OhYm9y?= , Johannes Schindelin , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin Since e4597aae6590 (run test suite without dashed git-commands in PATH, 2009-12-02), we stopped running our tests with `git-foo` binaries found at the top-level directory of a freshly built source tree; instead we have placed only `git` and selected `git-foo` commands that must be on `$PATH` in `bin-wrappers/` and prepended that `bin-wrappers/` to the `PATH` used in the test suite. We did that to catch the tests and scripted Git commands that still try to use the dashed form. Since CI jobs will not install the built Git to anywhere, and the hardlinks we make at the top-level of the source tree for `git-add` and friends are not even used during tests, they are pure waste of resources these days. Thanks to the newly invented `SKIP_DASHED_BUILT_INS` knob, we can now skip creating these links in the source tree. So let's do that. Note that this change introduces a subtle change of behavior: when Git's `cmd_main()` calls `setup_path()`, it inserts the value of `GIT_EXEC_PATH` (defaulting to `/libexec/git-core`) at the beginning of the environment variable `PATH`. This is necessary to find e.g. scripted commands that are installed in that location. For the purposes of Git's test suite, the `bin-wrappers/` scripts override `GIT_EXEC_PATH` to point to the top-level directory of the source code. In other words, if a scripted command had used a dashed invocation of a built-in Git command, it would not have been caught previously, which is fixed by this change. Signed-off-by: Johannes Schindelin --- ci/lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/lib.sh b/ci/lib.sh index 3eefec500d..821e3660d6 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -178,6 +178,7 @@ fi export DEVELOPER=1 export DEFAULT_TEST_TARGET=prove export GIT_TEST_CLONE_2GB=true +export SKIP_DASHED_BUILT_INS=YesPlease case "$jobname" in linux-clang|linux-gcc)