{"thread":{"id":"55994","subject":"[PATCH 0/6] ci: speed-up the Windows parts of our GitHub workflow","startedAt":"2021-06-23T15:24:22Z","lastAt":"2021-07-14T08:51:34Z","messageCount":41,"participants":["Johannes Schindelin via GitGitGadget","Dennis Ameling via GitGitGadget","Junio C Hamano","Ævar Arnfjörð Bjarmason","Johannes Schindelin","Philip Oakley"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"428271","messageId":"pull.878.git.1624461857.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":null,"subject":"[PATCH 0/6] ci: speed-up the Windows parts of our GitHub workflow","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-06-23T15:24:10Z","receivedAt":"2021-06-23T15:24:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This patch series upgrades to newer versions of a couple GitHub Actions we\nuse, and also streamlines the Windows jobs using the relatively new\nsetup-git-for-windows-sdk Action\n[https://github.com/marketplace/actions/setup-git-for-windows-sdk] (Git for\nWindows is running with this Action for a while now, getting all the kinks\nout).\n\nThis patch series should also address the problem where seen was pushed so\nrapidly that the windows-test jobs failed because they no longer checked out\nthe identical revision as the windows-build job.\n\nDennis Ameling (1):\n  ci(vs-build): build with NO_GETTEXT\n\nJohannes Schindelin (5):\n  ci: use the new GitHub Action to download git-sdk-64-minimal\n  ci (vs-build): use `cmd` to copy the DLLs, not `powershell`\n  ci: upgrade to using actions/{up,down}load-artifacts v2\n  ci(windows): transfer also the Git-tracked files to the test jobs\n  ci: accelerate the checkout\n\n .github/workflows/main.yml | 157 +++++++++++--------------------------\n 1 file changed, 46 insertions(+), 111 deletions(-)\n\n\nbase-commit: 670b81a890388c60b7032a4f5b879f2ece8c4558\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-878%2Fdscho%2Fuse-setup-git-for-windows-sdk-action-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-878/dscho/use-setup-git-for-windows-sdk-action-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/878\n-- \ngitgitgadget\n"},{"id":"428272","messageId":"a913af64f9dbed880a736e5d2da330aff76794b2.1624461857.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"[PATCH 2/6] ci (vs-build): use `cmd` to copy the DLLs, not `powershell`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-06-23T15:24:12Z","receivedAt":"2021-06-23T15:24:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe use a `.bat` script to copy the DLLs in the `vs-build` job, and those\ntype of scripts are native to CMD, not to PowerShell.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex c62766e7b1..d430c4e0d2 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -152,10 +152,8 @@ jobs:\n     - name: add msbuild to PATH\n       uses: microsoft/setup-msbuild@v1\n     - name: copy dlls to root\n-      shell: powershell\n-      run: |\n-        & compat\\vcbuild\\vcpkg_copy_dlls.bat release\n-        if (!$?) { exit(1) }\n+      shell: cmd\n+      run: compat\\vcbuild\\vcpkg_copy_dlls.bat release\n     - name: generate Visual Studio solution\n       shell: bash\n       run: |\n-- \ngitgitgadget\n\n"},{"id":"428273","messageId":"8da66c425a13557bd83ec1cddfcf86587da2a8f0.1624461857.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"[PATCH 1/6] ci: use the new GitHub Action to download git-sdk-64-minimal","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-06-23T15:24:11Z","receivedAt":"2021-06-23T15:24:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn our continuous builds, Windows is the odd cookie that requires a\ncomplete development environment to be downloaded because there is no\nsuitable one installed by default on Windows.\n\nSide note: technically, there _is_ a development environment present in\nGitHub Actions' build agents: MSYS2. But it differs from Git for\nWindows' SDK in subtle points, unfortunately enough so to prevent Git's\ntest suite from running without failures.\n\nTraditionally, we support downloading this environment (which we\nnicknamed `git-sdk-64-minimal`) via a PowerShell scriptlet that accesses\nthe build artifacts of a dedicated Azure Pipeline (which packages a tiny\nsubset of the full Git for Windows SDK, containing just enough to build\nGit and run its test suite).\n\nThis PowerShell script is unfortunately not very robust and sometimes\nfails due to network issues.\n\nOf course, we could add code to detect that situation, wait a little,\ntry again, if it fails again wait a little longer, lather, rinse and\nrepeat.\n\nInstead of doing all of this in Git's own `.github/workflows/`, though,\nlet's offload this logic to the new GitHub Action at\nhttps://github.com/marketplace/actions/setup-git-for-windows-sdk\n\nThis Action not only downloads and extracts git-sdk-64-minimal _outside_\nthe worktree (making it no longer necessary to meddle with\n`.gitignore` or `.git/info/exclude`), it also adds the `bash.exe` to the\n`PATH` and sets the environment variable `MSYSTEM` (an implementation\ndetail that Git's workflow should never have needed to know about).\n\nThis allows us to convert all those funny PowerShell tasks that wanted\nto call git-sdk-64-minimal's `bash.exe`: they all are now regular `bash`\nscriptlets.\n\nThis finally lets us get rid of the funny quoting and escaping where we\nhad to pay attention not only to quote and escape the Bash scriptlets\nproperly, but also to add a second level of escaping (with backslashes\nfor double quotes and backticks for dollar signs) to stop PowerShell\nfrom doing unintended things.\n\nFurther, this Action uses a fast caching strategy native to GitHub\nActions that should accelerate the download across CI runs:\ngit-sdk-64-minimal is usually updated once per 24h, and needs to be\ncached only once within that period. Caching it (unfortunately only on\na per-branch basis) speeds up the download step, and makes it much more\nrobust at the same time by virtue of accessing a cache location that is\ncloser in the network topology.\n\nWith this we can drop the home-rolled caching where we try to accelerate\nthe test phase by uploading git-sdk-64-minimal as a workflow artifact\nafter using it to build Git, and then download it as workflow artifact\nin the test phase.\n\nEven better: the `vs-test` job no longer needs to depend on the\n`windows-build` job. The only reason it depended on it was to ensure\nthat the `git-sdk-64-minimal` workflow artifact was available.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 103 +++++++------------------------------\n 1 file changed, 19 insertions(+), 84 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 73856bafc9..c62766e7b1 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -82,43 +82,18 @@ jobs:\n     runs-on: windows-latest\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      shell: bash\n-      run: |\n-        ## Get artifact\n-        urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds\n-        id=$(curl \"$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\\$top=1\" |\n-          jq -r \".value[] | .id\")\n-        download_url=\"$(curl \"$urlbase/$id/artifacts\" |\n-          jq -r '.value[] | select(.name == \"git-sdk-64-minimal\").resource.downloadUrl')\"\n-        curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \\\n-          -o artifacts.zip \"$download_url\"\n-\n-        ## Unzip and remove the artifact\n-        unzip artifacts.zip\n-        rm artifacts.zip\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: build\n-      shell: powershell\n+      shell: bash\n       env:\n         HOME: ${{runner.workspace}}\n-        MSYSTEM: MINGW64\n         NO_PERL: 1\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-        printf '%s\\n' /git-sdk-64-minimal/ >>.git/info/exclude\n-\n-          ci/make-test-artifacts.sh artifacts\n-        \"@\n+      run: ci/make-test-artifacts.sh artifacts\n     - name: upload build artifacts\n       uses: actions/upload-artifact@v1\n       with:\n         name: windows-artifacts\n         path: artifacts\n-    - name: upload git-sdk-64-minimal\n-      uses: actions/upload-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: git-sdk-64-minimal\n   windows-test:\n     runs-on: windows-latest\n     needs: [windows-build]\n@@ -136,25 +111,14 @@ jobs:\n     - name: extract build artifacts\n       shell: bash\n       run: tar xf artifacts.tar.gz\n-    - name: download git-sdk-64-minimal\n-      uses: actions/download-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: ${{github.workspace}}/git-sdk-64-minimal/\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: test\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          # Let Git ignore the SDK\n-          printf '%s\\n' /git-sdk-64-minimal/ >>.git/info/exclude\n-\n-          ci/run-test-slice.sh ${{matrix.nr}} 10\n-        \"@\n+      shell: bash\n+      run: ci/run-test-slice.sh ${{matrix.nr}} 10\n     - name: ci/print-test-failures.sh\n       if: failure()\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc ci/print-test-failures.sh\n+      shell: bash\n+      run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n       uses: actions/upload-artifact@v1\n@@ -165,27 +129,12 @@ jobs:\n     needs: ci-config\n     if: needs.ci-config.outputs.enabled == 'yes'\n     env:\n-      MSYSTEM: MINGW64\n       NO_PERL: 1\n       GIT_CONFIG_PARAMETERS: \"'user.name=CI' 'user.email=ci@git'\"\n     runs-on: windows-latest\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      shell: bash\n-      run: |\n-        ## Get artifact\n-        urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds\n-        id=$(curl \"$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\\$top=1\" |\n-          jq -r \".value[] | .id\")\n-        download_url=\"$(curl \"$urlbase/$id/artifacts\" |\n-          jq -r '.value[] | select(.name == \"git-sdk-64-minimal\").resource.downloadUrl')\"\n-        curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \\\n-          -o artifacts.zip \"$download_url\"\n-\n-        ## Unzip and remove the artifact\n-        unzip artifacts.zip\n-        rm artifacts.zip\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: initialize vcpkg\n       uses: actions/checkout@v2\n       with:\n@@ -211,19 +160,17 @@ jobs:\n       shell: bash\n       run: |\n         cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n-        -DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n+        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n     - name: MSBuild\n       run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n     - name: bundle artifact tar\n-      shell: powershell\n+      shell: bash\n       env:\n         MSVC: 1\n         VCPKG_ROOT: ${{github.workspace}}\\compat\\vcbuild\\vcpkg\n       run: |\n-        & git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          mkdir -p artifacts &&\n-          eval \\\"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\\\"\n-        \"@\n+        mkdir -p artifacts &&\n+        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n     - name: upload build artifacts\n       uses: actions/upload-artifact@v1\n       with:\n@@ -231,18 +178,14 @@ jobs:\n         path: artifacts\n   vs-test:\n     runs-on: windows-latest\n-    needs: [vs-build, windows-build]\n+    needs: vs-build\n     strategy:\n       fail-fast: false\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      uses: actions/download-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: ${{github.workspace}}/git-sdk-64-minimal/\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: download build artifacts\n       uses: actions/download-artifact@v1\n       with:\n@@ -252,23 +195,15 @@ jobs:\n       shell: bash\n       run: tar xf artifacts.tar.gz\n     - name: test\n-      shell: powershell\n+      shell: bash\n       env:\n-        MSYSTEM: MINGW64\n         NO_SVN_TESTS: 1\n         GIT_TEST_SKIP_REBASE_P: 1\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          # Let Git ignore the SDK and the test-cache\n-          printf '%s\\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude\n-\n-          ci/run-test-slice.sh ${{matrix.nr}} 10\n-        \"@\n+      run: ci/run-test-slice.sh ${{matrix.nr}} 10\n     - name: ci/print-test-failures.sh\n       if: failure()\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc ci/print-test-failures.sh\n+      shell: bash\n+      run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n       uses: actions/upload-artifact@v1\n-- \ngitgitgadget\n\n"},{"id":"428274","messageId":"a5084795ab039f6e7b9ab97cced3d7567e709327.1624461857.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"[PATCH 5/6] ci(vs-build): build with NO_GETTEXT","fromName":"Dennis Ameling via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-06-23T15:24:15Z","receivedAt":"2021-06-23T15:24:28Z","isPatch":true,"sender":{"key":"name:Dennis Ameling","avatar":null},"body":"From: Dennis Ameling <dennis@dennisameling.com>\n\nWe already build Git for Windows with `NO_GETTEXT` when compiling with\nGCC. Let's do the same with Visual C, too.\n\nSigned-off-by: Dennis Ameling <dennis@dennisameling.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 0f7516c9ef..3b40c677ab 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -159,7 +159,7 @@ jobs:\n       shell: bash\n       run: |\n         cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n-        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n+        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n     - name: MSBuild\n       run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n     - name: bundle artifact tar\n-- \ngitgitgadget\n\n"},{"id":"428275","messageId":"7930465e80971eeef79aff012008cd43199cfb50.1624461857.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"[PATCH 3/6] ci: upgrade to using actions/{up,down}load-artifacts v2","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-06-23T15:24:13Z","receivedAt":"2021-06-23T15:24:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe GitHub Actions to upload/download workflow artifacts saw a major\nupgrade since Git's GitHub workflow was established. Let's use it.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex d430c4e0d2..a399114c0f 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -90,7 +90,7 @@ jobs:\n         NO_PERL: 1\n       run: ci/make-test-artifacts.sh artifacts\n     - name: upload build artifacts\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: windows-artifacts\n         path: artifacts\n@@ -104,7 +104,7 @@ jobs:\n     steps:\n     - uses: actions/checkout@v1\n     - name: download build artifacts\n-      uses: actions/download-artifact@v1\n+      uses: actions/download-artifact@v2\n       with:\n         name: windows-artifacts\n         path: ${{github.workspace}}\n@@ -121,7 +121,7 @@ jobs:\n       run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-windows\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -170,7 +170,7 @@ jobs:\n         mkdir -p artifacts &&\n         eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n     - name: upload build artifacts\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: vs-artifacts\n         path: artifacts\n@@ -185,7 +185,7 @@ jobs:\n     - uses: actions/checkout@v1\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: download build artifacts\n-      uses: actions/download-artifact@v1\n+      uses: actions/download-artifact@v2\n       with:\n         name: vs-artifacts\n         path: ${{github.workspace}}\n@@ -204,7 +204,7 @@ jobs:\n       run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-windows\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -242,7 +242,7 @@ jobs:\n       if: failure()\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-${{matrix.vector.jobname}}\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -269,7 +269,7 @@ jobs:\n       if: failure()\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-${{matrix.vector.jobname}}\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n-- \ngitgitgadget\n\n"},{"id":"428276","messageId":"1520a9ffb574652fda1d2a20c97dc859fa476945.1624461857.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"[PATCH 4/6] ci(windows): transfer also the Git-tracked files to the test jobs","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-06-23T15:24:14Z","receivedAt":"2021-06-23T15:24:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGit's test suite is excruciatingly slow on Windows, mainly due to the\nfact that it executes a lot of shell script code, and that's simply not\nnative to Windows.\n\nTo help with that, we established the pattern where the artifacts are\nfirst built in one job, and then multiple test jobs run in parallel\nusing the artifacts built in the first job.\n\nWe take pains in transferring only the build outputs, and letting\n`actions/checkout` fill in the rest of the files.\n\nOne major downside of that strategy is that the test jobs might fail to\ncheck out the intended revision (e.g. because the branch has been\nupdated while the build was running, as is frequently the case with the\n`seen` branch).\n\nLet's transfer also the files tracked by Git, and skip the checkout step\nin the test jobs.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 22 ++++++++++++----------\n 1 file changed, 12 insertions(+), 10 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex a399114c0f..0f7516c9ef 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -89,7 +89,9 @@ jobs:\n         HOME: ${{runner.workspace}}\n         NO_PERL: 1\n       run: ci/make-test-artifacts.sh artifacts\n-    - name: upload build artifacts\n+    - name: zip up tracked files\n+      run: git archive -o artifacts/tracked.tar.gz HEAD\n+    - name: upload tracked files and build artifacts\n       uses: actions/upload-artifact@v2\n       with:\n         name: windows-artifacts\n@@ -102,15 +104,14 @@ jobs:\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n-    - uses: actions/checkout@v1\n-    - name: download build artifacts\n+    - name: download tracked files and build artifacts\n       uses: actions/download-artifact@v2\n       with:\n         name: windows-artifacts\n         path: ${{github.workspace}}\n-    - name: extract build artifacts\n+    - name: extract tracked files and build artifacts\n       shell: bash\n-      run: tar xf artifacts.tar.gz\n+      run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: test\n       shell: bash\n@@ -169,7 +170,9 @@ jobs:\n       run: |\n         mkdir -p artifacts &&\n         eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n-    - name: upload build artifacts\n+    - name: zip up tracked files\n+      run: git archive -o artifacts/tracked.tar.gz HEAD\n+    - name: upload tracked files and build artifacts\n       uses: actions/upload-artifact@v2\n       with:\n         name: vs-artifacts\n@@ -182,16 +185,15 @@ jobs:\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n-    - uses: actions/checkout@v1\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n-    - name: download build artifacts\n+    - name: download tracked files and build artifacts\n       uses: actions/download-artifact@v2\n       with:\n         name: vs-artifacts\n         path: ${{github.workspace}}\n-    - name: extract build artifacts\n+    - name: extract tracked files and build artifacts\n       shell: bash\n-      run: tar xf artifacts.tar.gz\n+      run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz\n     - name: test\n       shell: bash\n       env:\n-- \ngitgitgadget\n\n"},{"id":"428277","messageId":"e772d8f1d9b9e044833d715cef89bc43876b31d8.1624461857.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"[PATCH 6/6] ci: accelerate the checkout","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-06-23T15:24:16Z","receivedAt":"2021-06-23T15:24:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nBy upgrading from v1 to v2 of `actions/checkout`, we avoid fetching all\nthe tags and the complete history: v2 only fetches one revision by\ndefault. This should make things a lot faster.\n\nNote that `actions/checkout@v2` seems to be incompatible with running in\ncontainers: https://github.com/actions/checkout/issues/151. Therefore,\nwe stick with v1 there.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 3b40c677ab..405204c78a 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -81,7 +81,7 @@ jobs:\n     if: needs.ci-config.outputs.enabled == 'yes'\n     runs-on: windows-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: build\n       shell: bash\n@@ -134,7 +134,7 @@ jobs:\n       GIT_CONFIG_PARAMETERS: \"'user.name=CI' 'user.email=ci@git'\"\n     runs-on: windows-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: initialize vcpkg\n       uses: actions/checkout@v2\n@@ -237,7 +237,7 @@ jobs:\n       jobname: ${{matrix.vector.jobname}}\n     runs-on: ${{matrix.vector.pool}}\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/run-build-and-tests.sh\n     - run: ci/print-test-failures.sh\n@@ -282,7 +282,7 @@ jobs:\n       jobname: StaticAnalysis\n     runs-on: ubuntu-18.04\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/run-static-analysis.sh\n   documentation:\n@@ -292,6 +292,6 @@ jobs:\n       jobname: Documentation\n     runs-on: ubuntu-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/test-documentation.sh\n-- \ngitgitgadget\n"},{"id":"428990","messageId":"xmqqk0m9r8sr.fsf@gitster.g","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/6] ci: speed-up the Windows parts of our GitHub workflow","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-01T22:03:32Z","receivedAt":"2021-07-01T22:03:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> This patch series upgrades to newer versions of a couple GitHub Actions we\n> use, and also streamlines the Windows jobs using the relatively new\n> setup-git-for-windows-sdk Action\n> [https://github.com/marketplace/actions/setup-git-for-windows-sdk] (Git for\n> Windows is running with this Action for a while now, getting all the kinks\n> out).\n>\n> This patch series should also address the problem where seen was pushed so\n> rapidly that the windows-test jobs failed because they no longer checked out\n> the identical revision as the windows-build job.\n\nhttps://github.com/git/git/actions/runs/991636423 is the run on the\nreal 'seen' for the day, which fails vs-build.  The same 'seen',\nwith this topic excluded, seems to make everything pass and can be\nseen at https://github.com/git/git/actions/runs/991543592\n\nCI/PR(seen) runs in the past few days all include this topic, and all\nof them have failed the vs-build job.\n\nThanks.\n\n"},{"id":"429135","messageId":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.git.1624461857.gitgitgadget@gmail.com","subject":"[PATCH v2 0/7] ci: speed-up the Windows parts of our GitHub workflow","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:25Z","receivedAt":"2021-07-03T21:26:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This patch series upgrades to newer versions of a couple GitHub Actions we\nuse, and also streamlines the Windows jobs using the relatively new\nsetup-git-for-windows-sdk Action\n[https://github.com/marketplace/actions/setup-git-for-windows-sdk] (Git for\nWindows is running with this Action for a while now, getting all the kinks\nout).\n\nThis patch series should also address the problem where seen was pushed so\nrapidly that the windows-test jobs failed because they no longer checked out\nthe identical revision as the windows-build job.\n\nChanges since v1:\n\n * Added a patch to fix make NO_GETTEXT=Yep artifacts-tar (not to include\n   .mo files), as suggested by Matthias Aßauer in the GitGitGadget PR, which\n   should fix the CI failure in seen that Junio pointed out. The bug was\n   unhidden by mr/cmake fixing the CMake build (which ignored NO_GETTEXT\n   before).\n\nDennis Ameling (1):\n  ci(vs-build): build with NO_GETTEXT\n\nJohannes Schindelin (6):\n  ci: use the new GitHub Action to download git-sdk-64-minimal\n  ci (vs-build): use `cmd` to copy the DLLs, not `powershell`\n  ci: upgrade to using actions/{up,down}load-artifacts v2\n  ci(windows): transfer also the Git-tracked files to the test jobs\n  artifacts-tar: respect NO_GETTEXT\n  ci: accelerate the checkout\n\n .github/workflows/main.yml | 157 +++++++++++--------------------------\n Makefile                   |   5 +-\n 2 files changed, 50 insertions(+), 112 deletions(-)\n\n\nbase-commit: ebf3c04b262aa27fbb97f8a0156c2347fecafafb\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-878%2Fdscho%2Fuse-setup-git-for-windows-sdk-action-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-878/dscho/use-setup-git-for-windows-sdk-action-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/878\n\nRange-diff vs v1:\n\n 1:  8da66c425a1 = 1:  2e4db688deb ci: use the new GitHub Action to download git-sdk-64-minimal\n 2:  a913af64f9d = 2:  6b12fe2284c ci (vs-build): use `cmd` to copy the DLLs, not `powershell`\n 3:  7930465e809 = 3:  c256bbf4b1c ci: upgrade to using actions/{up,down}load-artifacts v2\n 4:  1520a9ffb57 = 4:  59dc44428fb ci(windows): transfer also the Git-tracked files to the test jobs\n -:  ----------- > 5:  c31d2e7f44a artifacts-tar: respect NO_GETTEXT\n 5:  a5084795ab0 = 6:  8bab4c17b8a ci(vs-build): build with NO_GETTEXT\n 6:  e772d8f1d9b = 7:  88a44863cd0 ci: accelerate the checkout\n\n-- \ngitgitgadget\n"},{"id":"429136","messageId":"6b12fe2284cb5949a57d2e39c543bef3ff12784d.1625347592.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v2 2/7] ci (vs-build): use `cmd` to copy the DLLs, not `powershell`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:27Z","receivedAt":"2021-07-03T21:26:39Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe use a `.bat` script to copy the DLLs in the `vs-build` job, and those\ntype of scripts are native to CMD, not to PowerShell.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex c62766e7b1a..d430c4e0d20 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -152,10 +152,8 @@ jobs:\n     - name: add msbuild to PATH\n       uses: microsoft/setup-msbuild@v1\n     - name: copy dlls to root\n-      shell: powershell\n-      run: |\n-        & compat\\vcbuild\\vcpkg_copy_dlls.bat release\n-        if (!$?) { exit(1) }\n+      shell: cmd\n+      run: compat\\vcbuild\\vcpkg_copy_dlls.bat release\n     - name: generate Visual Studio solution\n       shell: bash\n       run: |\n-- \ngitgitgadget\n\n"},{"id":"429137","messageId":"c256bbf4b1ce5f8fc13ca3aae47618b87985a906.1625347592.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v2 3/7] ci: upgrade to using actions/{up,down}load-artifacts v2","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:28Z","receivedAt":"2021-07-03T21:26:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe GitHub Actions to upload/download workflow artifacts saw a major\nupgrade since Git's GitHub workflow was established. Let's use it.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex d430c4e0d20..a399114c0f8 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -90,7 +90,7 @@ jobs:\n         NO_PERL: 1\n       run: ci/make-test-artifacts.sh artifacts\n     - name: upload build artifacts\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: windows-artifacts\n         path: artifacts\n@@ -104,7 +104,7 @@ jobs:\n     steps:\n     - uses: actions/checkout@v1\n     - name: download build artifacts\n-      uses: actions/download-artifact@v1\n+      uses: actions/download-artifact@v2\n       with:\n         name: windows-artifacts\n         path: ${{github.workspace}}\n@@ -121,7 +121,7 @@ jobs:\n       run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-windows\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -170,7 +170,7 @@ jobs:\n         mkdir -p artifacts &&\n         eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n     - name: upload build artifacts\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: vs-artifacts\n         path: artifacts\n@@ -185,7 +185,7 @@ jobs:\n     - uses: actions/checkout@v1\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: download build artifacts\n-      uses: actions/download-artifact@v1\n+      uses: actions/download-artifact@v2\n       with:\n         name: vs-artifacts\n         path: ${{github.workspace}}\n@@ -204,7 +204,7 @@ jobs:\n       run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-windows\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -242,7 +242,7 @@ jobs:\n       if: failure()\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-${{matrix.vector.jobname}}\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -269,7 +269,7 @@ jobs:\n       if: failure()\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-${{matrix.vector.jobname}}\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n-- \ngitgitgadget\n\n"},{"id":"429138","messageId":"2e4db688deb938592257882c06b658cf3b8463f8.1625347592.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v2 1/7] ci: use the new GitHub Action to download git-sdk-64-minimal","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:26Z","receivedAt":"2021-07-03T21:26:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn our continuous builds, Windows is the odd cookie that requires a\ncomplete development environment to be downloaded because there is no\nsuitable one installed by default on Windows.\n\nSide note: technically, there _is_ a development environment present in\nGitHub Actions' build agents: MSYS2. But it differs from Git for\nWindows' SDK in subtle points, unfortunately enough so to prevent Git's\ntest suite from running without failures.\n\nTraditionally, we support downloading this environment (which we\nnicknamed `git-sdk-64-minimal`) via a PowerShell scriptlet that accesses\nthe build artifacts of a dedicated Azure Pipeline (which packages a tiny\nsubset of the full Git for Windows SDK, containing just enough to build\nGit and run its test suite).\n\nThis PowerShell script is unfortunately not very robust and sometimes\nfails due to network issues.\n\nOf course, we could add code to detect that situation, wait a little,\ntry again, if it fails again wait a little longer, lather, rinse and\nrepeat.\n\nInstead of doing all of this in Git's own `.github/workflows/`, though,\nlet's offload this logic to the new GitHub Action at\nhttps://github.com/marketplace/actions/setup-git-for-windows-sdk\n\nThis Action not only downloads and extracts git-sdk-64-minimal _outside_\nthe worktree (making it no longer necessary to meddle with\n`.gitignore` or `.git/info/exclude`), it also adds the `bash.exe` to the\n`PATH` and sets the environment variable `MSYSTEM` (an implementation\ndetail that Git's workflow should never have needed to know about).\n\nThis allows us to convert all those funny PowerShell tasks that wanted\nto call git-sdk-64-minimal's `bash.exe`: they all are now regular `bash`\nscriptlets.\n\nThis finally lets us get rid of the funny quoting and escaping where we\nhad to pay attention not only to quote and escape the Bash scriptlets\nproperly, but also to add a second level of escaping (with backslashes\nfor double quotes and backticks for dollar signs) to stop PowerShell\nfrom doing unintended things.\n\nFurther, this Action uses a fast caching strategy native to GitHub\nActions that should accelerate the download across CI runs:\ngit-sdk-64-minimal is usually updated once per 24h, and needs to be\ncached only once within that period. Caching it (unfortunately only on\na per-branch basis) speeds up the download step, and makes it much more\nrobust at the same time by virtue of accessing a cache location that is\ncloser in the network topology.\n\nWith this we can drop the home-rolled caching where we try to accelerate\nthe test phase by uploading git-sdk-64-minimal as a workflow artifact\nafter using it to build Git, and then download it as workflow artifact\nin the test phase.\n\nEven better: the `vs-test` job no longer needs to depend on the\n`windows-build` job. The only reason it depended on it was to ensure\nthat the `git-sdk-64-minimal` workflow artifact was available.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 103 +++++++------------------------------\n 1 file changed, 19 insertions(+), 84 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 73856bafc9d..c62766e7b1a 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -82,43 +82,18 @@ jobs:\n     runs-on: windows-latest\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      shell: bash\n-      run: |\n-        ## Get artifact\n-        urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds\n-        id=$(curl \"$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\\$top=1\" |\n-          jq -r \".value[] | .id\")\n-        download_url=\"$(curl \"$urlbase/$id/artifacts\" |\n-          jq -r '.value[] | select(.name == \"git-sdk-64-minimal\").resource.downloadUrl')\"\n-        curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \\\n-          -o artifacts.zip \"$download_url\"\n-\n-        ## Unzip and remove the artifact\n-        unzip artifacts.zip\n-        rm artifacts.zip\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: build\n-      shell: powershell\n+      shell: bash\n       env:\n         HOME: ${{runner.workspace}}\n-        MSYSTEM: MINGW64\n         NO_PERL: 1\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-        printf '%s\\n' /git-sdk-64-minimal/ >>.git/info/exclude\n-\n-          ci/make-test-artifacts.sh artifacts\n-        \"@\n+      run: ci/make-test-artifacts.sh artifacts\n     - name: upload build artifacts\n       uses: actions/upload-artifact@v1\n       with:\n         name: windows-artifacts\n         path: artifacts\n-    - name: upload git-sdk-64-minimal\n-      uses: actions/upload-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: git-sdk-64-minimal\n   windows-test:\n     runs-on: windows-latest\n     needs: [windows-build]\n@@ -136,25 +111,14 @@ jobs:\n     - name: extract build artifacts\n       shell: bash\n       run: tar xf artifacts.tar.gz\n-    - name: download git-sdk-64-minimal\n-      uses: actions/download-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: ${{github.workspace}}/git-sdk-64-minimal/\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: test\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          # Let Git ignore the SDK\n-          printf '%s\\n' /git-sdk-64-minimal/ >>.git/info/exclude\n-\n-          ci/run-test-slice.sh ${{matrix.nr}} 10\n-        \"@\n+      shell: bash\n+      run: ci/run-test-slice.sh ${{matrix.nr}} 10\n     - name: ci/print-test-failures.sh\n       if: failure()\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc ci/print-test-failures.sh\n+      shell: bash\n+      run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n       uses: actions/upload-artifact@v1\n@@ -165,27 +129,12 @@ jobs:\n     needs: ci-config\n     if: needs.ci-config.outputs.enabled == 'yes'\n     env:\n-      MSYSTEM: MINGW64\n       NO_PERL: 1\n       GIT_CONFIG_PARAMETERS: \"'user.name=CI' 'user.email=ci@git'\"\n     runs-on: windows-latest\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      shell: bash\n-      run: |\n-        ## Get artifact\n-        urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds\n-        id=$(curl \"$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\\$top=1\" |\n-          jq -r \".value[] | .id\")\n-        download_url=\"$(curl \"$urlbase/$id/artifacts\" |\n-          jq -r '.value[] | select(.name == \"git-sdk-64-minimal\").resource.downloadUrl')\"\n-        curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \\\n-          -o artifacts.zip \"$download_url\"\n-\n-        ## Unzip and remove the artifact\n-        unzip artifacts.zip\n-        rm artifacts.zip\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: initialize vcpkg\n       uses: actions/checkout@v2\n       with:\n@@ -211,19 +160,17 @@ jobs:\n       shell: bash\n       run: |\n         cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n-        -DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n+        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n     - name: MSBuild\n       run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n     - name: bundle artifact tar\n-      shell: powershell\n+      shell: bash\n       env:\n         MSVC: 1\n         VCPKG_ROOT: ${{github.workspace}}\\compat\\vcbuild\\vcpkg\n       run: |\n-        & git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          mkdir -p artifacts &&\n-          eval \\\"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\\\"\n-        \"@\n+        mkdir -p artifacts &&\n+        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n     - name: upload build artifacts\n       uses: actions/upload-artifact@v1\n       with:\n@@ -231,18 +178,14 @@ jobs:\n         path: artifacts\n   vs-test:\n     runs-on: windows-latest\n-    needs: [vs-build, windows-build]\n+    needs: vs-build\n     strategy:\n       fail-fast: false\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      uses: actions/download-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: ${{github.workspace}}/git-sdk-64-minimal/\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: download build artifacts\n       uses: actions/download-artifact@v1\n       with:\n@@ -252,23 +195,15 @@ jobs:\n       shell: bash\n       run: tar xf artifacts.tar.gz\n     - name: test\n-      shell: powershell\n+      shell: bash\n       env:\n-        MSYSTEM: MINGW64\n         NO_SVN_TESTS: 1\n         GIT_TEST_SKIP_REBASE_P: 1\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          # Let Git ignore the SDK and the test-cache\n-          printf '%s\\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude\n-\n-          ci/run-test-slice.sh ${{matrix.nr}} 10\n-        \"@\n+      run: ci/run-test-slice.sh ${{matrix.nr}} 10\n     - name: ci/print-test-failures.sh\n       if: failure()\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc ci/print-test-failures.sh\n+      shell: bash\n+      run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n       uses: actions/upload-artifact@v1\n-- \ngitgitgadget\n\n"},{"id":"429139","messageId":"8bab4c17b8a6d7a3ed66e5d9e3eb8f598b35b874.1625347592.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v2 6/7] ci(vs-build): build with NO_GETTEXT","fromName":"Dennis Ameling via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:31Z","receivedAt":"2021-07-03T21:26:48Z","isPatch":true,"sender":{"key":"name:Dennis Ameling","avatar":null},"body":"From: Dennis Ameling <dennis@dennisameling.com>\n\nWe already build Git for Windows with `NO_GETTEXT` when compiling with\nGCC. Let's do the same with Visual C, too.\n\nSigned-off-by: Dennis Ameling <dennis@dennisameling.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 0f7516c9ef3..3b40c677ab5 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -159,7 +159,7 @@ jobs:\n       shell: bash\n       run: |\n         cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n-        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n+        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n     - name: MSBuild\n       run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n     - name: bundle artifact tar\n-- \ngitgitgadget\n\n"},{"id":"429140","messageId":"c31d2e7f44a8b27210dbde9bc6938ce16a9e0c17.1625347592.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v2 5/7] artifacts-tar: respect NO_GETTEXT","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:30Z","receivedAt":"2021-07-03T21:26:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe obviously do not want to bundle `.mo` files during `make\nartifacts-tar NO_GETTEXT`, but that was the case.\n\nTo fix that, go a step beyond just fixing the symptom, and simply\ndefine the lists of `.po` and `.mo` files as empty if `NO_GETTEXT` is\nset.\n\nHelped-by: Matthias Aßhauer <mha1993@live.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex c3565fc0f8f..04e852be015 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2675,10 +2675,13 @@ po/git.pot: $(GENERATED_H) FORCE\n .PHONY: pot\n pot: po/git.pot\n \n+ifdef NO_GETTEXT\n+POFILES :=\n+MOFILES :=\n+else\n POFILES := $(wildcard po/*.po)\n MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))\n \n-ifndef NO_GETTEXT\n all:: $(MOFILES)\n endif\n \n-- \ngitgitgadget\n\n"},{"id":"429141","messageId":"88a44863cd013fc9c152ff91cf109fd7b1073257.1625347592.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v2 7/7] ci: accelerate the checkout","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:32Z","receivedAt":"2021-07-03T21:26:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nBy upgrading from v1 to v2 of `actions/checkout`, we avoid fetching all\nthe tags and the complete history: v2 only fetches one revision by\ndefault. This should make things a lot faster.\n\nNote that `actions/checkout@v2` seems to be incompatible with running in\ncontainers: https://github.com/actions/checkout/issues/151. Therefore,\nwe stick with v1 there.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 3b40c677ab5..405204c78a7 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -81,7 +81,7 @@ jobs:\n     if: needs.ci-config.outputs.enabled == 'yes'\n     runs-on: windows-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: build\n       shell: bash\n@@ -134,7 +134,7 @@ jobs:\n       GIT_CONFIG_PARAMETERS: \"'user.name=CI' 'user.email=ci@git'\"\n     runs-on: windows-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: initialize vcpkg\n       uses: actions/checkout@v2\n@@ -237,7 +237,7 @@ jobs:\n       jobname: ${{matrix.vector.jobname}}\n     runs-on: ${{matrix.vector.pool}}\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/run-build-and-tests.sh\n     - run: ci/print-test-failures.sh\n@@ -282,7 +282,7 @@ jobs:\n       jobname: StaticAnalysis\n     runs-on: ubuntu-18.04\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/run-static-analysis.sh\n   documentation:\n@@ -292,6 +292,6 @@ jobs:\n       jobname: Documentation\n     runs-on: ubuntu-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/test-documentation.sh\n-- \ngitgitgadget\n"},{"id":"429142","messageId":"59dc44428fbc168a5edbb6e6679c9b8aff8d74c1.1625347592.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v2 4/7] ci(windows): transfer also the Git-tracked files to the test jobs","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-03T21:26:29Z","receivedAt":"2021-07-03T21:26:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGit's test suite is excruciatingly slow on Windows, mainly due to the\nfact that it executes a lot of shell script code, and that's simply not\nnative to Windows.\n\nTo help with that, we established the pattern where the artifacts are\nfirst built in one job, and then multiple test jobs run in parallel\nusing the artifacts built in the first job.\n\nWe take pains in transferring only the build outputs, and letting\n`actions/checkout` fill in the rest of the files.\n\nOne major downside of that strategy is that the test jobs might fail to\ncheck out the intended revision (e.g. because the branch has been\nupdated while the build was running, as is frequently the case with the\n`seen` branch).\n\nLet's transfer also the files tracked by Git, and skip the checkout step\nin the test jobs.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 22 ++++++++++++----------\n 1 file changed, 12 insertions(+), 10 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex a399114c0f8..0f7516c9ef3 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -89,7 +89,9 @@ jobs:\n         HOME: ${{runner.workspace}}\n         NO_PERL: 1\n       run: ci/make-test-artifacts.sh artifacts\n-    - name: upload build artifacts\n+    - name: zip up tracked files\n+      run: git archive -o artifacts/tracked.tar.gz HEAD\n+    - name: upload tracked files and build artifacts\n       uses: actions/upload-artifact@v2\n       with:\n         name: windows-artifacts\n@@ -102,15 +104,14 @@ jobs:\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n-    - uses: actions/checkout@v1\n-    - name: download build artifacts\n+    - name: download tracked files and build artifacts\n       uses: actions/download-artifact@v2\n       with:\n         name: windows-artifacts\n         path: ${{github.workspace}}\n-    - name: extract build artifacts\n+    - name: extract tracked files and build artifacts\n       shell: bash\n-      run: tar xf artifacts.tar.gz\n+      run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: test\n       shell: bash\n@@ -169,7 +170,9 @@ jobs:\n       run: |\n         mkdir -p artifacts &&\n         eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n-    - name: upload build artifacts\n+    - name: zip up tracked files\n+      run: git archive -o artifacts/tracked.tar.gz HEAD\n+    - name: upload tracked files and build artifacts\n       uses: actions/upload-artifact@v2\n       with:\n         name: vs-artifacts\n@@ -182,16 +185,15 @@ jobs:\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n-    - uses: actions/checkout@v1\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n-    - name: download build artifacts\n+    - name: download tracked files and build artifacts\n       uses: actions/download-artifact@v2\n       with:\n         name: vs-artifacts\n         path: ${{github.workspace}}\n-    - name: extract build artifacts\n+    - name: extract tracked files and build artifacts\n       shell: bash\n-      run: tar xf artifacts.tar.gz\n+      run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz\n     - name: test\n       shell: bash\n       env:\n-- \ngitgitgadget\n\n"},{"id":"429151","messageId":"87bl7i8ou8.fsf@evledraar.gmail.com","threadId":"55994","inReplyTo":"a5084795ab039f6e7b9ab97cced3d7567e709327.1624461857.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 5/6] ci(vs-build): build with NO_GETTEXT","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-07-04T08:27:01Z","receivedAt":"2021-07-04T08:28:52Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Jun 23 2021, Dennis Ameling via GitGitGadget wrote:\n\n> From: Dennis Ameling <dennis@dennisameling.com>\n>\n> We already build Git for Windows with `NO_GETTEXT` when compiling with\n> GCC. Let's do the same with Visual C, too.\n>\n> Signed-off-by: Dennis Ameling <dennis@dennisameling.com>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  .github/workflows/main.yml | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> index 0f7516c9ef..3b40c677ab 100644\n> --- a/.github/workflows/main.yml\n> +++ b/.github/workflows/main.yml\n> @@ -159,7 +159,7 @@ jobs:\n>        shell: bash\n>        run: |\n>          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n> -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>      - name: MSBuild\n>        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n>      - name: bundle artifact tar\n\nTo a first approximation isn't the point of CI to test a diversity of\nsetups? So \"we already do X in job A, let's do it X in job B\" seems like\nthe opposite of a self-justifying rationale, surely our default approach\nwould be to do things differently?\n\nPerhaps this change makes sense, just commenting on the explanation in\nthe commit message. I think it should cover:\n\n * Why: Is it being done for speed, hard to install libintl or whatever?\n\n * Coverage: Before we tested on this platform with this knob, do we\n   have another CI job that covers what we'll lose in coverage here, if\n   not is it OK because it's tested in some other way etc?\n"},{"id":"429152","messageId":"878s2m8ns9.fsf@evledraar.gmail.com","threadId":"55994","inReplyTo":"c31d2e7f44a8b27210dbde9bc6938ce16a9e0c17.1625347592.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 5/7] artifacts-tar: respect NO_GETTEXT","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-07-04T08:30:27Z","receivedAt":"2021-07-04T08:52:48Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Sat, Jul 03 2021, Johannes Schindelin via GitGitGadget wrote:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> We obviously do not want to bundle `.mo` files during `make\n> artifacts-tar NO_GETTEXT`, but that was the case.\n\nShould be:\n\n    make artifacts-tar NO_GETTEXT=YesPlease\n\n(Without the =<something> we try to find a \"NO_GETTEXT\" target)\n\n> To fix that, go a step beyond just fixing the symptom, and simply\n> define the lists of `.po` and `.mo` files as empty if `NO_GETTEXT` is\n> set.\n\nHow about fixing the cause instead of the symptom...\n\n> Helped-by: Matthias Aßhauer <mha1993@live.de>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  Makefile | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n>\n> diff --git a/Makefile b/Makefile\n> index c3565fc0f8f..04e852be015 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -2675,10 +2675,13 @@ po/git.pot: $(GENERATED_H) FORCE\n>  .PHONY: pot\n>  pot: po/git.pot\n>  \n> +ifdef NO_GETTEXT\n> +POFILES :=\n> +MOFILES :=\n> +else\n>  POFILES := $(wildcard po/*.po)\n>  MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))\n>  \n> -ifndef NO_GETTEXT\n>  all:: $(MOFILES)\n>  endif\n\n...i.e. this patch just seems like odd (ab)use of Makefile logic.\n\nLater on in the artifacts-tar rule we rely on our immediate dependency\nlist in $^ to feed to \"tar czf\", and here we're going to set $(MOFILES)\nto an empty list, just to later interpolate that empty list into that\nlist of dependencies.\n\nWouldn't the mores straightforward thing to do be the diff I've got at\nthe end here, perhaps with a preceding commit just for the split-up of\nthe dependency list?\n\nThis matches how we do things elsewhere, i.e. we don't ifdef e.g. this away:\n\n    LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)\n    LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))\n\nrather we keep the list as-is, and ifdef the actual addition of the\ndependency, e.g.:\n\n    ifndef NO_PERL\n    all:: $(LIB_PERL_GEN)\n    [...]\n    endif\n\nOne reason we do it like this is because we *don't* want to forget what\nthe MOFILES were, because you want e.g. \"make clean\" to clean them up\n(not that it matters in this case, we rm -rf po/build).\n\nDoesn't matter much here, but following this pattern leads to subtle\n\"bugs\", e.g. an outstanding issue in your 179227d6e21 (Optionally skip\nlinking/copying the built-ins, 2020-09-21) (which I noted on-list in\npassing before, IIRC) where during a build we end up with stale\nbuilt-ins from a previous build in the build directory, because we\npruned the list during definition time, as opposed to adding an inverse\n\"I should remove this then\" rule.\n\n(\"bug\" because it doesn't have any actual effect I know of other than\nbothering me that I have e.g. a git-add in my build-dir still :)\n\ndiff --git a/Makefile b/Makefile\nindex c3565fc0f8f..7fb1d4b6caa 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3146,9 +3146,18 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),)\n OTHER_PROGRAMS += $(shell echo *.dll t/helper/*.dll)\n endif\n \n-artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \\\n-\t\tGIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \\\n-\t\t$(MOFILES)\n+ARTIFACTS_TAR =\n+ARTIFACTS_TAR += GIT-BUILD-OPTIONS\n+ARTIFACTS_TAR += $(ALL_COMMANDS_TO_INSTALL)\n+ARTIFACTS_TAR += $(SCRIPT_LIB)\n+ARTIFACTS_TAR += $(OTHER_PROGRAMS) \n+ARTIFACTS_TAR += $(TEST_PROGRAMS)\n+ARTIFACTS_TAR += $(test_bindir_programs)\n+ifndef NO_GETTEXT\n+ARTIFACTS_TAR += $(MOFILES)\n+endif\n+\n+artifacts-tar:: $(ARTIFACTS_TAR)\n \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \\\n \t\tSHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'\n \ttest -n \"$(ARTIFACTS_DIRECTORY)\"\n"},{"id":"429153","messageId":"875yxq8nqd.fsf@evledraar.gmail.com","threadId":"55994","inReplyTo":"87bl7i8ou8.fsf@evledraar.gmail.com","subject":"Re: [PATCH 5/6] ci(vs-build): build with NO_GETTEXT","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-07-04T08:52:08Z","receivedAt":"2021-07-04T08:52:48Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Sun, Jul 04 2021, Ævar Arnfjörð Bjarmason wrote:\n\n> On Wed, Jun 23 2021, Dennis Ameling via GitGitGadget wrote:\n>\n>> From: Dennis Ameling <dennis@dennisameling.com>\n>>\n>> We already build Git for Windows with `NO_GETTEXT` when compiling with\n>> GCC. Let's do the same with Visual C, too.\n>>\n>> Signed-off-by: Dennis Ameling <dennis@dennisameling.com>\n>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> ---\n>>  .github/workflows/main.yml | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n>> index 0f7516c9ef..3b40c677ab 100644\n>> --- a/.github/workflows/main.yml\n>> +++ b/.github/workflows/main.yml\n>> @@ -159,7 +159,7 @@ jobs:\n>>        shell: bash\n>>        run: |\n>>          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n>> -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>> +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>>      - name: MSBuild\n>>        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n>>      - name: bundle artifact tar\n>\n> To a first approximation isn't the point of CI to test a diversity of\n> setups? So \"we already do X in job A, let's do it X in job B\" seems like\n> the opposite of a self-justifying rationale, surely our default approach\n> would be to do things differently?\n>\n> Perhaps this change makes sense, just commenting on the explanation in\n> the commit message. I think it should cover:\n>\n>  * Why: Is it being done for speed, hard to install libintl or whatever?\n>\n>  * Coverage: Before we tested on this platform with this knob, do we\n>    have another CI job that covers what we'll lose in coverage here, if\n>    not is it OK because it's tested in some other way etc?\n\nAside: I should have replied to the v2[1] version of this, but the same\ncomment applies to it. Sorry about the confusion.\n\n1. http://lore.kernel.org/git/8bab4c17b8a6d7a3ed66e5d9e3eb8f598b35b874.1625347592.git.gitgitgadget@gmail.com\n"},{"id":"429154","messageId":"8735su8nkk.fsf@evledraar.gmail.com","threadId":"55994","inReplyTo":"88a44863cd013fc9c152ff91cf109fd7b1073257.1625347592.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 7/7] ci: accelerate the checkout","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-07-04T08:54:48Z","receivedAt":"2021-07-04T08:56:18Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Sat, Jul 03 2021, Johannes Schindelin via GitGitGadget wrote:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> By upgrading from v1 to v2 of `actions/checkout`, we avoid fetching all\n> the tags and the complete history: v2 only fetches one revision by\n> default. This should make things a lot faster.\n>\n> Note that `actions/checkout@v2` seems to be incompatible with running in\n> containers: https://github.com/actions/checkout/issues/151. Therefore,\n> we stick with v1 there.\n\nI'd suggest that we shouldn't link to a \"closed\" issue here and instead\nto what seems to be the successor issue:\nhttps://github.com/actions/checkout/issues/334\n\nBut looking at #151 most of the issue is a bazillion commit references\nto this commit being rebased again and again, seems like github isn't\nespecially well set up for the \"spam\" our perpetual rebasing of the same\ncommits causes :)\n"},{"id":"429169","messageId":"nycvar.QRO.7.76.6.2107050036220.8230@tvgsbejvaqbjf.bet","threadId":"55994","inReplyTo":"8735su8nkk.fsf@evledraar.gmail.com","subject":"Re: [PATCH v2 7/7] ci: accelerate the checkout","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-07-04T22:37:28Z","receivedAt":"2021-07-04T22:37:45Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Sun, 4 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n\n>\n> On Sat, Jul 03 2021, Johannes Schindelin via GitGitGadget wrote:\n>\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >\n> > By upgrading from v1 to v2 of `actions/checkout`, we avoid fetching all\n> > the tags and the complete history: v2 only fetches one revision by\n> > default. This should make things a lot faster.\n> >\n> > Note that `actions/checkout@v2` seems to be incompatible with running in\n> > containers: https://github.com/actions/checkout/issues/151. Therefore,\n> > we stick with v1 there.\n>\n> I'd suggest that we shouldn't link to a \"closed\" issue here and instead\n> to what seems to be the successor issue:\n> https://github.com/actions/checkout/issues/334\n\nI'd suggest that we can still link to this issue, even if it was closed\nwithout the bug actually having been fixed. The ticket describes the\nproblem well.\n\n> But looking at #151 most of the issue is a bazillion commit references\n> to this commit being rebased again and again, seems like github isn't\n> especially well set up for the \"spam\" our perpetual rebasing of the same\n> commits causes :)\n\nSure, blame me.\n\nCiao,\nDscho\n"},{"id":"429170","messageId":"nycvar.QRO.7.76.6.2107050038520.8230@tvgsbejvaqbjf.bet","threadId":"55994","inReplyTo":"878s2m8ns9.fsf@evledraar.gmail.com","subject":"Re: [PATCH v2 5/7] artifacts-tar: respect NO_GETTEXT","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-07-04T22:52:46Z","receivedAt":"2021-07-04T22:52:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Sun, 4 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n\n> On Sat, Jul 03 2021, Johannes Schindelin via GitGitGadget wrote:\n>\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >\n> > We obviously do not want to bundle `.mo` files during `make\n> > artifacts-tar NO_GETTEXT`, but that was the case.\n>\n> Should be:\n>\n>     make artifacts-tar NO_GETTEXT=YesPlease\n>\n> (Without the =<something> we try to find a \"NO_GETTEXT\" target)\n\nCorrect. Will fix.\n\n> > To fix that, go a step beyond just fixing the symptom, and simply\n> > define the lists of `.po` and `.mo` files as empty if `NO_GETTEXT` is\n> > set.\n>\n> How about fixing the cause instead of the symptom...\n\nYes, from my point of view, I did that.\n\n> > Helped-by: Matthias Aßhauer <mha1993@live.de>\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >  Makefile | 5 ++++-\n> >  1 file changed, 4 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/Makefile b/Makefile\n> > index c3565fc0f8f..04e852be015 100644\n> > --- a/Makefile\n> > +++ b/Makefile\n> > @@ -2675,10 +2675,13 @@ po/git.pot: $(GENERATED_H) FORCE\n> >  .PHONY: pot\n> >  pot: po/git.pot\n> >\n> > +ifdef NO_GETTEXT\n> > +POFILES :=\n> > +MOFILES :=\n> > +else\n> >  POFILES := $(wildcard po/*.po)\n> >  MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))\n> >\n> > -ifndef NO_GETTEXT\n> >  all:: $(MOFILES)\n> >  endif\n>\n> ...i.e. this patch just seems like odd (ab)use of Makefile logic.\n>\n> Later on in the artifacts-tar rule we rely on our immediate dependency\n> list in $^ to feed to \"tar czf\", and here we're going to set $(MOFILES)\n> to an empty list, just to later interpolate that empty list into that\n> list of dependencies.\n>\n> Wouldn't the mores straightforward thing to do be the diff I've got at\n> the end here, perhaps with a preceding commit just for the split-up of\n> the dependency list?\n>\n> This matches how we do things elsewhere, i.e. we don't ifdef e.g. this away:\n>\n>     LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)\n>     LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))\n>\n> rather we keep the list as-is, and ifdef the actual addition of the\n> dependency, e.g.:\n>\n>     ifndef NO_PERL\n>     all:: $(LIB_PERL_GEN)\n>     [...]\n>     endif\n>\n> One reason we do it like this is because we *don't* want to forget what\n> the MOFILES were, because you want e.g. \"make clean\" to clean them up\n> (not that it matters in this case, we rm -rf po/build).\n\nWe don't need to be careful about cleaning files we did not generate in\nthe first place.\n\nYour suggestion amounts to unnecessary work. If we asked for NO_GETTEXT,\nwhy bother generating the list of `.po` files at all? (Rhetorical\nquestion; The answer is \"we don't need to\".)\n\n> Doesn't matter much here, but following this pattern leads to subtle\n> \"bugs\", e.g. an outstanding issue in your 179227d6e21 (Optionally skip\n> linking/copying the built-ins, 2020-09-21) (which I noted on-list in\n> passing before, IIRC) where during a build we end up with stale\n> built-ins from a previous build in the build directory, because we\n> pruned the list during definition time, as opposed to adding an inverse\n> \"I should remove this then\" rule.\n>\n> (\"bug\" because it doesn't have any actual effect I know of other than\n> bothering me that I have e.g. a git-add in my build-dir still :)\n>\n> diff --git a/Makefile b/Makefile\n> index c3565fc0f8f..7fb1d4b6caa 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -3146,9 +3146,18 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),)\n>  OTHER_PROGRAMS += $(shell echo *.dll t/helper/*.dll)\n>  endif\n>\n> -artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \\\n> -\t\tGIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \\\n> -\t\t$(MOFILES)\n> +ARTIFACTS_TAR =\n> +ARTIFACTS_TAR += GIT-BUILD-OPTIONS\n> +ARTIFACTS_TAR += $(ALL_COMMANDS_TO_INSTALL)\n> +ARTIFACTS_TAR += $(SCRIPT_LIB)\n> +ARTIFACTS_TAR += $(OTHER_PROGRAMS)\n> +ARTIFACTS_TAR += $(TEST_PROGRAMS)\n> +ARTIFACTS_TAR += $(test_bindir_programs)\n> +ifndef NO_GETTEXT\n> +ARTIFACTS_TAR += $(MOFILES)\n> +endif\n> +\n> +artifacts-tar:: $(ARTIFACTS_TAR)\n\nApart from going out of its way to retain the construction of the `.po`\nfile list (which is totally pointless when operating under `NO_GETTEXT`),\nthis is also a sore to my eyes. So I won't do that.\n\nThank you for trying to assist in improving this patch series,\nDscho\n\n>  \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \\\n>  \t\tSHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'\n>  \ttest -n \"$(ARTIFACTS_DIRECTORY)\"\n>\n>\n"},{"id":"429171","messageId":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v2.git.1625347592.gitgitgadget@gmail.com","subject":"[PATCH v3 0/7] ci: speed-up the Windows parts of our GitHub workflow","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:07Z","receivedAt":"2021-07-04T22:55:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This patch series upgrades to newer versions of a couple GitHub Actions we\nuse, and also streamlines the Windows jobs using the relatively new\nsetup-git-for-windows-sdk Action\n[https://github.com/marketplace/actions/setup-git-for-windows-sdk] (Git for\nWindows is running with this Action for a while now, getting all the kinks\nout).\n\nThis patch series should also address the problem where seen was pushed so\nrapidly that the windows-test jobs failed because they no longer checked out\nthe identical revision as the windows-build job.\n\nChanges since v2:\n\n * Made the handwaving make [...] NO_GETTEXT comment in the commit message\n   of the patch \"artifacts-tar: respect NO_GETTEXT\" more explicit, by\n   setting NO_GETTEXT to a bogus value as required by make.\n * Added an explicit NO_GETTEXT=YesPlease to the make artifacts-tar\n   invocation in the vs-build job, as well as an explanation in the\n   corresponding commit message why this explicit mention is technically not\n   required.\n\nChanges since v1:\n\n * Added a patch to fix make NO_GETTEXT=Yep artifacts-tar (not to include\n   .mo files), as suggested by Matthias Aßauer in the GitGitGadget PR, which\n   should fix the CI failure in seen that Junio pointed out. The bug was\n   unhidden by mr/cmake fixing the CMake build (which ignored NO_GETTEXT\n   before).\n\nDennis Ameling (1):\n  ci(vs-build): build with NO_GETTEXT\n\nJohannes Schindelin (6):\n  ci: use the new GitHub Action to download git-sdk-64-minimal\n  ci (vs-build): use `cmd` to copy the DLLs, not `powershell`\n  ci: upgrade to using actions/{up,down}load-artifacts v2\n  ci(windows): transfer also the Git-tracked files to the test jobs\n  artifacts-tar: respect NO_GETTEXT\n  ci: accelerate the checkout\n\n .github/workflows/main.yml | 157 +++++++++++--------------------------\n Makefile                   |   5 +-\n 2 files changed, 50 insertions(+), 112 deletions(-)\n\n\nbase-commit: ebf3c04b262aa27fbb97f8a0156c2347fecafafb\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-878%2Fdscho%2Fuse-setup-git-for-windows-sdk-action-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-878/dscho/use-setup-git-for-windows-sdk-action-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/878\n\nRange-diff vs v2:\n\n 1:  2e4db688deb = 1:  2e4db688deb ci: use the new GitHub Action to download git-sdk-64-minimal\n 2:  6b12fe2284c = 2:  6b12fe2284c ci (vs-build): use `cmd` to copy the DLLs, not `powershell`\n 3:  c256bbf4b1c = 3:  c256bbf4b1c ci: upgrade to using actions/{up,down}load-artifacts v2\n 4:  59dc44428fb = 4:  59dc44428fb ci(windows): transfer also the Git-tracked files to the test jobs\n 5:  c31d2e7f44a ! 5:  64f7b1f4e23 artifacts-tar: respect NO_GETTEXT\n     @@ Commit message\n          artifacts-tar: respect NO_GETTEXT\n      \n          We obviously do not want to bundle `.mo` files during `make\n     -    artifacts-tar NO_GETTEXT`, but that was the case.\n     +    artifacts-tar NO_GETTEXT=Yep`, but that was the case.\n      \n          To fix that, go a step beyond just fixing the symptom, and simply\n          define the lists of `.po` and `.mo` files as empty if `NO_GETTEXT` is\n 6:  8bab4c17b8a ! 6:  2c4cd9dd1c8 ci(vs-build): build with NO_GETTEXT\n     @@ Commit message\n          We already build Git for Windows with `NO_GETTEXT` when compiling with\n          GCC. Let's do the same with Visual C, too.\n      \n     +    Note that we do not technically _need_ to pass `NO_GETTEXT` explicitly\n     +    in that `make artifacts-tar` invocation because we do this while `MSVC`\n     +    is set (which will set `uname_S := Windows`, which in turn will set\n     +    `NO_GETTEXT = YesPlease`). But it is definitely nicer to be explicit\n     +    here.\n     +\n          Signed-off-by: Dennis Ameling <dennis@dennisameling.com>\n     +    Helped-by: Matthias Aßhauer <mha1993@live.de>\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## .github/workflows/main.yml ##\n     @@ .github/workflows/main.yml: jobs:\n           - name: MSBuild\n             run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n           - name: bundle artifact tar\n     +@@ .github/workflows/main.yml: jobs:\n     +         VCPKG_ROOT: ${{github.workspace}}\\compat\\vcbuild\\vcpkg\n     +       run: |\n     +         mkdir -p artifacts &&\n     +-        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n     ++        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)\"\n     +     - name: zip up tracked files\n     +       run: git archive -o artifacts/tracked.tar.gz HEAD\n     +     - name: upload tracked files and build artifacts\n 7:  88a44863cd0 = 7:  db54bf9a779 ci: accelerate the checkout\n\n-- \ngitgitgadget\n"},{"id":"429172","messageId":"2e4db688deb938592257882c06b658cf3b8463f8.1625439315.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"[PATCH v3 1/7] ci: use the new GitHub Action to download git-sdk-64-minimal","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:08Z","receivedAt":"2021-07-04T22:55:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn our continuous builds, Windows is the odd cookie that requires a\ncomplete development environment to be downloaded because there is no\nsuitable one installed by default on Windows.\n\nSide note: technically, there _is_ a development environment present in\nGitHub Actions' build agents: MSYS2. But it differs from Git for\nWindows' SDK in subtle points, unfortunately enough so to prevent Git's\ntest suite from running without failures.\n\nTraditionally, we support downloading this environment (which we\nnicknamed `git-sdk-64-minimal`) via a PowerShell scriptlet that accesses\nthe build artifacts of a dedicated Azure Pipeline (which packages a tiny\nsubset of the full Git for Windows SDK, containing just enough to build\nGit and run its test suite).\n\nThis PowerShell script is unfortunately not very robust and sometimes\nfails due to network issues.\n\nOf course, we could add code to detect that situation, wait a little,\ntry again, if it fails again wait a little longer, lather, rinse and\nrepeat.\n\nInstead of doing all of this in Git's own `.github/workflows/`, though,\nlet's offload this logic to the new GitHub Action at\nhttps://github.com/marketplace/actions/setup-git-for-windows-sdk\n\nThis Action not only downloads and extracts git-sdk-64-minimal _outside_\nthe worktree (making it no longer necessary to meddle with\n`.gitignore` or `.git/info/exclude`), it also adds the `bash.exe` to the\n`PATH` and sets the environment variable `MSYSTEM` (an implementation\ndetail that Git's workflow should never have needed to know about).\n\nThis allows us to convert all those funny PowerShell tasks that wanted\nto call git-sdk-64-minimal's `bash.exe`: they all are now regular `bash`\nscriptlets.\n\nThis finally lets us get rid of the funny quoting and escaping where we\nhad to pay attention not only to quote and escape the Bash scriptlets\nproperly, but also to add a second level of escaping (with backslashes\nfor double quotes and backticks for dollar signs) to stop PowerShell\nfrom doing unintended things.\n\nFurther, this Action uses a fast caching strategy native to GitHub\nActions that should accelerate the download across CI runs:\ngit-sdk-64-minimal is usually updated once per 24h, and needs to be\ncached only once within that period. Caching it (unfortunately only on\na per-branch basis) speeds up the download step, and makes it much more\nrobust at the same time by virtue of accessing a cache location that is\ncloser in the network topology.\n\nWith this we can drop the home-rolled caching where we try to accelerate\nthe test phase by uploading git-sdk-64-minimal as a workflow artifact\nafter using it to build Git, and then download it as workflow artifact\nin the test phase.\n\nEven better: the `vs-test` job no longer needs to depend on the\n`windows-build` job. The only reason it depended on it was to ensure\nthat the `git-sdk-64-minimal` workflow artifact was available.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 103 +++++++------------------------------\n 1 file changed, 19 insertions(+), 84 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 73856bafc9d..c62766e7b1a 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -82,43 +82,18 @@ jobs:\n     runs-on: windows-latest\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      shell: bash\n-      run: |\n-        ## Get artifact\n-        urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds\n-        id=$(curl \"$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\\$top=1\" |\n-          jq -r \".value[] | .id\")\n-        download_url=\"$(curl \"$urlbase/$id/artifacts\" |\n-          jq -r '.value[] | select(.name == \"git-sdk-64-minimal\").resource.downloadUrl')\"\n-        curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \\\n-          -o artifacts.zip \"$download_url\"\n-\n-        ## Unzip and remove the artifact\n-        unzip artifacts.zip\n-        rm artifacts.zip\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: build\n-      shell: powershell\n+      shell: bash\n       env:\n         HOME: ${{runner.workspace}}\n-        MSYSTEM: MINGW64\n         NO_PERL: 1\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-        printf '%s\\n' /git-sdk-64-minimal/ >>.git/info/exclude\n-\n-          ci/make-test-artifacts.sh artifacts\n-        \"@\n+      run: ci/make-test-artifacts.sh artifacts\n     - name: upload build artifacts\n       uses: actions/upload-artifact@v1\n       with:\n         name: windows-artifacts\n         path: artifacts\n-    - name: upload git-sdk-64-minimal\n-      uses: actions/upload-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: git-sdk-64-minimal\n   windows-test:\n     runs-on: windows-latest\n     needs: [windows-build]\n@@ -136,25 +111,14 @@ jobs:\n     - name: extract build artifacts\n       shell: bash\n       run: tar xf artifacts.tar.gz\n-    - name: download git-sdk-64-minimal\n-      uses: actions/download-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: ${{github.workspace}}/git-sdk-64-minimal/\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: test\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          # Let Git ignore the SDK\n-          printf '%s\\n' /git-sdk-64-minimal/ >>.git/info/exclude\n-\n-          ci/run-test-slice.sh ${{matrix.nr}} 10\n-        \"@\n+      shell: bash\n+      run: ci/run-test-slice.sh ${{matrix.nr}} 10\n     - name: ci/print-test-failures.sh\n       if: failure()\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc ci/print-test-failures.sh\n+      shell: bash\n+      run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n       uses: actions/upload-artifact@v1\n@@ -165,27 +129,12 @@ jobs:\n     needs: ci-config\n     if: needs.ci-config.outputs.enabled == 'yes'\n     env:\n-      MSYSTEM: MINGW64\n       NO_PERL: 1\n       GIT_CONFIG_PARAMETERS: \"'user.name=CI' 'user.email=ci@git'\"\n     runs-on: windows-latest\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      shell: bash\n-      run: |\n-        ## Get artifact\n-        urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds\n-        id=$(curl \"$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\\$top=1\" |\n-          jq -r \".value[] | .id\")\n-        download_url=\"$(curl \"$urlbase/$id/artifacts\" |\n-          jq -r '.value[] | select(.name == \"git-sdk-64-minimal\").resource.downloadUrl')\"\n-        curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \\\n-          -o artifacts.zip \"$download_url\"\n-\n-        ## Unzip and remove the artifact\n-        unzip artifacts.zip\n-        rm artifacts.zip\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: initialize vcpkg\n       uses: actions/checkout@v2\n       with:\n@@ -211,19 +160,17 @@ jobs:\n       shell: bash\n       run: |\n         cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n-        -DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n+        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n     - name: MSBuild\n       run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n     - name: bundle artifact tar\n-      shell: powershell\n+      shell: bash\n       env:\n         MSVC: 1\n         VCPKG_ROOT: ${{github.workspace}}\\compat\\vcbuild\\vcpkg\n       run: |\n-        & git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          mkdir -p artifacts &&\n-          eval \\\"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\\\"\n-        \"@\n+        mkdir -p artifacts &&\n+        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n     - name: upload build artifacts\n       uses: actions/upload-artifact@v1\n       with:\n@@ -231,18 +178,14 @@ jobs:\n         path: artifacts\n   vs-test:\n     runs-on: windows-latest\n-    needs: [vs-build, windows-build]\n+    needs: vs-build\n     strategy:\n       fail-fast: false\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n     - uses: actions/checkout@v1\n-    - name: download git-sdk-64-minimal\n-      uses: actions/download-artifact@v1\n-      with:\n-        name: git-sdk-64-minimal\n-        path: ${{github.workspace}}/git-sdk-64-minimal/\n+    - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: download build artifacts\n       uses: actions/download-artifact@v1\n       with:\n@@ -252,23 +195,15 @@ jobs:\n       shell: bash\n       run: tar xf artifacts.tar.gz\n     - name: test\n-      shell: powershell\n+      shell: bash\n       env:\n-        MSYSTEM: MINGW64\n         NO_SVN_TESTS: 1\n         GIT_TEST_SKIP_REBASE_P: 1\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc @\"\n-          # Let Git ignore the SDK and the test-cache\n-          printf '%s\\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude\n-\n-          ci/run-test-slice.sh ${{matrix.nr}} 10\n-        \"@\n+      run: ci/run-test-slice.sh ${{matrix.nr}} 10\n     - name: ci/print-test-failures.sh\n       if: failure()\n-      shell: powershell\n-      run: |\n-        & .\\git-sdk-64-minimal\\usr\\bin\\bash.exe -lc ci/print-test-failures.sh\n+      shell: bash\n+      run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n       uses: actions/upload-artifact@v1\n-- \ngitgitgadget\n\n"},{"id":"429173","messageId":"6b12fe2284cb5949a57d2e39c543bef3ff12784d.1625439315.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"[PATCH v3 2/7] ci (vs-build): use `cmd` to copy the DLLs, not `powershell`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:09Z","receivedAt":"2021-07-04T22:55:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe use a `.bat` script to copy the DLLs in the `vs-build` job, and those\ntype of scripts are native to CMD, not to PowerShell.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex c62766e7b1a..d430c4e0d20 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -152,10 +152,8 @@ jobs:\n     - name: add msbuild to PATH\n       uses: microsoft/setup-msbuild@v1\n     - name: copy dlls to root\n-      shell: powershell\n-      run: |\n-        & compat\\vcbuild\\vcpkg_copy_dlls.bat release\n-        if (!$?) { exit(1) }\n+      shell: cmd\n+      run: compat\\vcbuild\\vcpkg_copy_dlls.bat release\n     - name: generate Visual Studio solution\n       shell: bash\n       run: |\n-- \ngitgitgadget\n\n"},{"id":"429174","messageId":"c256bbf4b1ce5f8fc13ca3aae47618b87985a906.1625439315.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"[PATCH v3 3/7] ci: upgrade to using actions/{up,down}load-artifacts v2","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:10Z","receivedAt":"2021-07-04T22:55:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe GitHub Actions to upload/download workflow artifacts saw a major\nupgrade since Git's GitHub workflow was established. Let's use it.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex d430c4e0d20..a399114c0f8 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -90,7 +90,7 @@ jobs:\n         NO_PERL: 1\n       run: ci/make-test-artifacts.sh artifacts\n     - name: upload build artifacts\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: windows-artifacts\n         path: artifacts\n@@ -104,7 +104,7 @@ jobs:\n     steps:\n     - uses: actions/checkout@v1\n     - name: download build artifacts\n-      uses: actions/download-artifact@v1\n+      uses: actions/download-artifact@v2\n       with:\n         name: windows-artifacts\n         path: ${{github.workspace}}\n@@ -121,7 +121,7 @@ jobs:\n       run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-windows\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -170,7 +170,7 @@ jobs:\n         mkdir -p artifacts &&\n         eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n     - name: upload build artifacts\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: vs-artifacts\n         path: artifacts\n@@ -185,7 +185,7 @@ jobs:\n     - uses: actions/checkout@v1\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: download build artifacts\n-      uses: actions/download-artifact@v1\n+      uses: actions/download-artifact@v2\n       with:\n         name: vs-artifacts\n         path: ${{github.workspace}}\n@@ -204,7 +204,7 @@ jobs:\n       run: ci/print-test-failures.sh\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-windows\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -242,7 +242,7 @@ jobs:\n       if: failure()\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-${{matrix.vector.jobname}}\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n@@ -269,7 +269,7 @@ jobs:\n       if: failure()\n     - name: Upload failed tests' directories\n       if: failure() && env.FAILED_TEST_ARTIFACTS != ''\n-      uses: actions/upload-artifact@v1\n+      uses: actions/upload-artifact@v2\n       with:\n         name: failed-tests-${{matrix.vector.jobname}}\n         path: ${{env.FAILED_TEST_ARTIFACTS}}\n-- \ngitgitgadget\n\n"},{"id":"429175","messageId":"59dc44428fbc168a5edbb6e6679c9b8aff8d74c1.1625439315.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"[PATCH v3 4/7] ci(windows): transfer also the Git-tracked files to the test jobs","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:11Z","receivedAt":"2021-07-04T22:55:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGit's test suite is excruciatingly slow on Windows, mainly due to the\nfact that it executes a lot of shell script code, and that's simply not\nnative to Windows.\n\nTo help with that, we established the pattern where the artifacts are\nfirst built in one job, and then multiple test jobs run in parallel\nusing the artifacts built in the first job.\n\nWe take pains in transferring only the build outputs, and letting\n`actions/checkout` fill in the rest of the files.\n\nOne major downside of that strategy is that the test jobs might fail to\ncheck out the intended revision (e.g. because the branch has been\nupdated while the build was running, as is frequently the case with the\n`seen` branch).\n\nLet's transfer also the files tracked by Git, and skip the checkout step\nin the test jobs.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 22 ++++++++++++----------\n 1 file changed, 12 insertions(+), 10 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex a399114c0f8..0f7516c9ef3 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -89,7 +89,9 @@ jobs:\n         HOME: ${{runner.workspace}}\n         NO_PERL: 1\n       run: ci/make-test-artifacts.sh artifacts\n-    - name: upload build artifacts\n+    - name: zip up tracked files\n+      run: git archive -o artifacts/tracked.tar.gz HEAD\n+    - name: upload tracked files and build artifacts\n       uses: actions/upload-artifact@v2\n       with:\n         name: windows-artifacts\n@@ -102,15 +104,14 @@ jobs:\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n-    - uses: actions/checkout@v1\n-    - name: download build artifacts\n+    - name: download tracked files and build artifacts\n       uses: actions/download-artifact@v2\n       with:\n         name: windows-artifacts\n         path: ${{github.workspace}}\n-    - name: extract build artifacts\n+    - name: extract tracked files and build artifacts\n       shell: bash\n-      run: tar xf artifacts.tar.gz\n+      run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: test\n       shell: bash\n@@ -169,7 +170,9 @@ jobs:\n       run: |\n         mkdir -p artifacts &&\n         eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n-    - name: upload build artifacts\n+    - name: zip up tracked files\n+      run: git archive -o artifacts/tracked.tar.gz HEAD\n+    - name: upload tracked files and build artifacts\n       uses: actions/upload-artifact@v2\n       with:\n         name: vs-artifacts\n@@ -182,16 +185,15 @@ jobs:\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n-    - uses: actions/checkout@v1\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n-    - name: download build artifacts\n+    - name: download tracked files and build artifacts\n       uses: actions/download-artifact@v2\n       with:\n         name: vs-artifacts\n         path: ${{github.workspace}}\n-    - name: extract build artifacts\n+    - name: extract tracked files and build artifacts\n       shell: bash\n-      run: tar xf artifacts.tar.gz\n+      run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz\n     - name: test\n       shell: bash\n       env:\n-- \ngitgitgadget\n\n"},{"id":"429176","messageId":"db54bf9a779e168fcf87f2f9f4e5e43f6ccf7645.1625439315.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"[PATCH v3 7/7] ci: accelerate the checkout","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:14Z","receivedAt":"2021-07-04T22:55:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nBy upgrading from v1 to v2 of `actions/checkout`, we avoid fetching all\nthe tags and the complete history: v2 only fetches one revision by\ndefault. This should make things a lot faster.\n\nNote that `actions/checkout@v2` seems to be incompatible with running in\ncontainers: https://github.com/actions/checkout/issues/151. Therefore,\nwe stick with v1 there.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex c99628681ef..e6f99e29a3d 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -81,7 +81,7 @@ jobs:\n     if: needs.ci-config.outputs.enabled == 'yes'\n     runs-on: windows-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: build\n       shell: bash\n@@ -134,7 +134,7 @@ jobs:\n       GIT_CONFIG_PARAMETERS: \"'user.name=CI' 'user.email=ci@git'\"\n     runs-on: windows-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - uses: git-for-windows/setup-git-for-windows-sdk@v1\n     - name: initialize vcpkg\n       uses: actions/checkout@v2\n@@ -237,7 +237,7 @@ jobs:\n       jobname: ${{matrix.vector.jobname}}\n     runs-on: ${{matrix.vector.pool}}\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/run-build-and-tests.sh\n     - run: ci/print-test-failures.sh\n@@ -282,7 +282,7 @@ jobs:\n       jobname: StaticAnalysis\n     runs-on: ubuntu-18.04\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/run-static-analysis.sh\n   documentation:\n@@ -292,6 +292,6 @@ jobs:\n       jobname: Documentation\n     runs-on: ubuntu-latest\n     steps:\n-    - uses: actions/checkout@v1\n+    - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/test-documentation.sh\n-- \ngitgitgadget\n"},{"id":"429177","messageId":"64f7b1f4e231730c002dfdbac80627ace0e83bbc.1625439315.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"[PATCH v3 5/7] artifacts-tar: respect NO_GETTEXT","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:12Z","receivedAt":"2021-07-04T22:55:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe obviously do not want to bundle `.mo` files during `make\nartifacts-tar NO_GETTEXT=Yep`, but that was the case.\n\nTo fix that, go a step beyond just fixing the symptom, and simply\ndefine the lists of `.po` and `.mo` files as empty if `NO_GETTEXT` is\nset.\n\nHelped-by: Matthias Aßhauer <mha1993@live.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex c3565fc0f8f..04e852be015 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2675,10 +2675,13 @@ po/git.pot: $(GENERATED_H) FORCE\n .PHONY: pot\n pot: po/git.pot\n \n+ifdef NO_GETTEXT\n+POFILES :=\n+MOFILES :=\n+else\n POFILES := $(wildcard po/*.po)\n MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))\n \n-ifndef NO_GETTEXT\n all:: $(MOFILES)\n endif\n \n-- \ngitgitgadget\n\n"},{"id":"429178","messageId":"2c4cd9dd1c8d966c8df0349bb820449ae1290793.1625439315.git.gitgitgadget@gmail.com","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"[PATCH v3 6/7] ci(vs-build): build with NO_GETTEXT","fromName":"Dennis Ameling via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-04T22:55:13Z","receivedAt":"2021-07-04T22:55:29Z","isPatch":true,"sender":{"key":"name:Dennis Ameling","avatar":null},"body":"From: Dennis Ameling <dennis@dennisameling.com>\n\nWe already build Git for Windows with `NO_GETTEXT` when compiling with\nGCC. Let's do the same with Visual C, too.\n\nNote that we do not technically _need_ to pass `NO_GETTEXT` explicitly\nin that `make artifacts-tar` invocation because we do this while `MSVC`\nis set (which will set `uname_S := Windows`, which in turn will set\n`NO_GETTEXT = YesPlease`). But it is definitely nicer to be explicit\nhere.\n\nSigned-off-by: Dennis Ameling <dennis@dennisameling.com>\nHelped-by: Matthias Aßhauer <mha1993@live.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 0f7516c9ef3..c99628681ef 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -159,7 +159,7 @@ jobs:\n       shell: bash\n       run: |\n         cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n-        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n+        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n     - name: MSBuild\n       run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n     - name: bundle artifact tar\n@@ -169,7 +169,7 @@ jobs:\n         VCPKG_ROOT: ${{github.workspace}}\\compat\\vcbuild\\vcpkg\n       run: |\n         mkdir -p artifacts &&\n-        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n+        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)\"\n     - name: zip up tracked files\n       run: git archive -o artifacts/tracked.tar.gz HEAD\n     - name: upload tracked files and build artifacts\n-- \ngitgitgadget\n\n"},{"id":"429182","messageId":"87r1gd6z3o.fsf@evledraar.gmail.com","threadId":"55994","inReplyTo":"nycvar.QRO.7.76.6.2107050038520.8230@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 5/7] artifacts-tar: respect NO_GETTEXT","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-07-05T06:33:11Z","receivedAt":"2021-07-05T06:42:25Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Jul 05 2021, Johannes Schindelin wrote:\n\n> Hi Ævar,\n>\n> On Sun, 4 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n>\n>> On Sat, Jul 03 2021, Johannes Schindelin via GitGitGadget wrote:\n>>\n>> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> >\n>> > We obviously do not want to bundle `.mo` files during `make\n>> > artifacts-tar NO_GETTEXT`, but that was the case.\n>>\n>> Should be:\n>>\n>>     make artifacts-tar NO_GETTEXT=YesPlease\n>>\n>> (Without the =<something> we try to find a \"NO_GETTEXT\" target)\n>\n> Correct. Will fix.\n>\n>> > To fix that, go a step beyond just fixing the symptom, and simply\n>> > define the lists of `.po` and `.mo` files as empty if `NO_GETTEXT` is\n>> > set.\n>>\n>> How about fixing the cause instead of the symptom...\n>\n> Yes, from my point of view, I did that.\n>\n>> > Helped-by: Matthias Aßhauer <mha1993@live.de>\n>> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> > ---\n>> >  Makefile | 5 ++++-\n>> >  1 file changed, 4 insertions(+), 1 deletion(-)\n>> >\n>> > diff --git a/Makefile b/Makefile\n>> > index c3565fc0f8f..04e852be015 100644\n>> > --- a/Makefile\n>> > +++ b/Makefile\n>> > @@ -2675,10 +2675,13 @@ po/git.pot: $(GENERATED_H) FORCE\n>> >  .PHONY: pot\n>> >  pot: po/git.pot\n>> >\n>> > +ifdef NO_GETTEXT\n>> > +POFILES :=\n>> > +MOFILES :=\n>> > +else\n>> >  POFILES := $(wildcard po/*.po)\n>> >  MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))\n>> >\n>> > -ifndef NO_GETTEXT\n>> >  all:: $(MOFILES)\n>> >  endif\n>>\n>> ...i.e. this patch just seems like odd (ab)use of Makefile logic.\n>>\n>> Later on in the artifacts-tar rule we rely on our immediate dependency\n>> list in $^ to feed to \"tar czf\", and here we're going to set $(MOFILES)\n>> to an empty list, just to later interpolate that empty list into that\n>> list of dependencies.\n>>\n>> Wouldn't the mores straightforward thing to do be the diff I've got at\n>> the end here, perhaps with a preceding commit just for the split-up of\n>> the dependency list?\n>>\n>> This matches how we do things elsewhere, i.e. we don't ifdef e.g. this away:\n>>\n>>     LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)\n>>     LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))\n>>\n>> rather we keep the list as-is, and ifdef the actual addition of the\n>> dependency, e.g.:\n>>\n>>     ifndef NO_PERL\n>>     all:: $(LIB_PERL_GEN)\n>>     [...]\n>>     endif\n>>\n>> One reason we do it like this is because we *don't* want to forget what\n>> the MOFILES were, because you want e.g. \"make clean\" to clean them up\n>> (not that it matters in this case, we rm -rf po/build).\n>\n> We don't need to be careful about cleaning files we did not generate in\n> the first place.\n>\n> Your suggestion amounts to unnecessary work. If we asked for NO_GETTEXT,\n> why bother generating the list of `.po` files at all? (Rhetorical\n> question; The answer is \"we don't need to\".)\n\nI'm not saying that you in the Windows CI job generated them, but that\nin general we want to support doing these in sequence:\n\n    make NO_GETTEXT=Y <target>\n    make NO_GETTEXT= <target>\n\n...\n\n>> Doesn't matter much here, but following this pattern leads to subtle\n>> \"bugs\", e.g. an outstanding issue in your 179227d6e21 (Optionally skip\n>> linking/copying the built-ins, 2020-09-21) (which I noted on-list in\n>> passing before, IIRC) where during a build we end up with stale\n>> built-ins from a previous build in the build directory, because we\n>> pruned the list during definition time, as opposed to adding an inverse\n>> \"I should remove this then\" rule.\n>>\n>> (\"bug\" because it doesn't have any actual effect I know of other than\n>> bothering me that I have e.g. a git-add in my build-dir still :)\n>>\n>> diff --git a/Makefile b/Makefile\n>> index c3565fc0f8f..7fb1d4b6caa 100644\n>> --- a/Makefile\n>> +++ b/Makefile\n>> @@ -3146,9 +3146,18 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),)\n>>  OTHER_PROGRAMS += $(shell echo *.dll t/helper/*.dll)\n>>  endif\n>>\n>> -artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \\\n>> -\t\tGIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \\\n>> -\t\t$(MOFILES)\n>> +ARTIFACTS_TAR =\n>> +ARTIFACTS_TAR += GIT-BUILD-OPTIONS\n>> +ARTIFACTS_TAR += $(ALL_COMMANDS_TO_INSTALL)\n>> +ARTIFACTS_TAR += $(SCRIPT_LIB)\n>> +ARTIFACTS_TAR += $(OTHER_PROGRAMS)\n>> +ARTIFACTS_TAR += $(TEST_PROGRAMS)\n>> +ARTIFACTS_TAR += $(test_bindir_programs)\n>> +ifndef NO_GETTEXT\n>> +ARTIFACTS_TAR += $(MOFILES)\n>> +endif\n>> +\n>> +artifacts-tar:: $(ARTIFACTS_TAR)\n>\n> Apart from going out of its way to retain the construction of the `.po`\n> file list (which is totally pointless when operating under `NO_GETTEXT`),\n\n\n..and that yes, generally speaking there *is* a point in doing\nthat. E.g. we have another discussion now on-list about incorrectly\nspelled/copied config variables in po/*.po files.\n\nIt would be a natural thing to want to have some \"lint\" or \"check\"\ntarget for that which used $(POFILES) as a source, and you'd not want\nthat:\n\n    make check-pofiles\n\nTo do nothing under NO_GETTEXT=Y, but still use other Makefile\ndependencies, e.g. use config-list.h as a source of truth.\n\nTo be clear I don't think anything's breaking now with your patch, I\njust find the pattern of conflating the declaration of files in the\nMakefile with the current logic of the rules that happen to need them\nright now to be an anti-pattern.\n\n> this is also a sore to my eyes. So I won't do that.\n\nI agree that converting it is an eyesore, that's quite verbose, but it\nmakes any later patch much easier to read. You'll just need to add\nline(s), not modify that big dependency list in-place.\n\n> Thank you for trying to assist in improving this patch series,\n> Dscho\n\n>>  \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \\\n>>  \t\tSHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'\n>>  \ttest -n \"$(ARTIFACTS_DIRECTORY)\"\n>>\n>>\n\n"},{"id":"429183","messageId":"87o8bh6yhf.fsf@evledraar.gmail.com","threadId":"55994","inReplyTo":"2c4cd9dd1c8d966c8df0349bb820449ae1290793.1625439315.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v3 6/7] ci(vs-build): build with NO_GETTEXT","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-07-05T06:45:38Z","receivedAt":"2021-07-05T06:55:45Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Sun, Jul 04 2021, Dennis Ameling via GitGitGadget wrote:\n\n> From: Dennis Ameling <dennis@dennisameling.com>\n\nRe the v3 cover letter & my v2 comment:\n\n> We already build Git for Windows with `NO_GETTEXT` when compiling with\n> GCC. Let's do the same with Visual C, too.\n>\n> Note that we do not technically _need_ to pass `NO_GETTEXT` explicitly\n> in that `make artifacts-tar` invocation because we do this while `MSVC`\n> is set (which will set `uname_S := Windows`, which in turn will set\n> `NO_GETTEXT = YesPlease`). But it is definitely nicer to be explicit\n> here.\n\nOkey, so we never used it in the first place. That makes the subject and\nfirst paragraph of the commit message seem really out of place. So we\nreally mean something like this instead?:\n\n    ci(vs-build): be explicit about NO_GETTEXT\n\n    We already supply `NO_GETTEXT` implicitly due to config.mak.uname,\n    but let's do so explicitly to ???\n\nBut if we're being explicit we also have SKIP_DASHED_BUILT_INS=YesPlease\nsince ef60e9f74b2 (ci: stop linking built-ins to the dashed versions,\n2020-09-21) for CI, which has an even bigger effect on what's included\nin the tarball, so it seems odd to single out NO_GETTEXT=YesPlease,\nunless there's some other reason to do this that I'm missing.\n\nHrm, isn't the real reason here that before 5/7 this would error out,\nbecause while NO_GETTEXT=Y was implicit and we picked it up from the\nconfig.mak.uname, we just had the $(MOFILES) in the archive-tar list\nunconditionally.\n\nSo after 5/7 that's not the case, so we don't need this change anymore,\nbut we're making this change anyway? Seems like the result of this being\nthe first try at a fix, and then re-sequencing the two & keeping the\nnow-redundant hotfix.\n\n> Signed-off-by: Dennis Ameling <dennis@dennisameling.com>\n> Helped-by: Matthias Aßhauer <mha1993@live.de>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  .github/workflows/main.yml | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> index 0f7516c9ef3..c99628681ef 100644\n> --- a/.github/workflows/main.yml\n> +++ b/.github/workflows/main.yml\n> @@ -159,7 +159,7 @@ jobs:\n>        shell: bash\n>        run: |\n>          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n> -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>      - name: MSBuild\n>        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n>      - name: bundle artifact tar\n> @@ -169,7 +169,7 @@ jobs:\n>          VCPKG_ROOT: ${{github.workspace}}\\compat\\vcbuild\\vcpkg\n>        run: |\n>          mkdir -p artifacts &&\n> -        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n> +        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)\"\n>      - name: zip up tracked files\n>        run: git archive -o artifacts/tracked.tar.gz HEAD\n>      - name: upload tracked files and build artifacts\n\n"},{"id":"429237","messageId":"nycvar.QRO.7.76.6.2107051431440.8230@tvgsbejvaqbjf.bet","threadId":"55994","inReplyTo":"87o8bh6yhf.fsf@evledraar.gmail.com","subject":"Re: [PATCH v3 6/7] ci(vs-build): build with NO_GETTEXT","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-07-05T12:44:18Z","receivedAt":"2021-07-05T12:44:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Mon, 5 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n\n> On Sun, Jul 04 2021, Dennis Ameling via GitGitGadget wrote:\n>\n> > From: Dennis Ameling <dennis@dennisameling.com>\n>\n> Re the v3 cover letter & my v2 comment:\n>\n> > We already build Git for Windows with `NO_GETTEXT` when compiling with\n> > GCC. Let's do the same with Visual C, too.\n> >\n> > Note that we do not technically _need_ to pass `NO_GETTEXT` explicitly\n> > in that `make artifacts-tar` invocation because we do this while `MSVC`\n> > is set (which will set `uname_S := Windows`, which in turn will set\n> > `NO_GETTEXT = YesPlease`). But it is definitely nicer to be explicit\n> > here.\n>\n> Okey, so we never used it in the first place.\n\nNo, you misunderstood.\n\nWhile it _is_ true that we set `NO_GETTEXT` implicitly (via `MSVC`) when\nrunning `artifacts-tar`, that flag was ignored before this here patch\nseries.\n\n> That makes the subject and first paragraph of the commit message seem\n> really out of place. So we really mean something like this instead?:\n>\n>     ci(vs-build): be explicit about NO_GETTEXT\n>\n>     We already supply `NO_GETTEXT` implicitly due to config.mak.uname,\n>     but let's do so explicitly to ???\n>\n> But if we're being explicit we also have SKIP_DASHED_BUILT_INS=YesPlease\n> since ef60e9f74b2 (ci: stop linking built-ins to the dashed versions,\n> 2020-09-21) for CI, which has an even bigger effect on what's included\n> in the tarball, so it seems odd to single out NO_GETTEXT=YesPlease,\n> unless there's some other reason to do this that I'm missing.\n\nYes, you are missing the fact that the `SKIP_DASHED_BUILT_INS` flag is set\nexplicitly.\n\nThe `NO_GETTEXT` flag was _not_ set explicitly. It is set by the section\nof `config.mak.uname` that is in effect if `uname_S` is set to `Windows`,\nwhich it is if we set the `MSVC` flag, which we still set in `vs-build`,\nfor tradition, even if we no longer build with `make MSVC=OhYeah` but\nusing MSBuild.\n\nI hope this removes any confusion.\n\n> Hrm, isn't the real reason here that before 5/7 this would error out,\n> because while NO_GETTEXT=Y was implicit and we picked it up from the\n> config.mak.uname, we just had the $(MOFILES) in the archive-tar list\n> unconditionally.\n>\n> So after 5/7 that's not the case, so we don't need this change anymore,\n> but we're making this change anyway? Seems like the result of this being\n> the first try at a fix, and then re-sequencing the two & keeping the\n> now-redundant hotfix.\n\nExcuse me?\n\nThis here patch sets `NO_GETTEXT` when building Git in the `vs-build` job,\nand consequently sets `NO_GETTEXT` when bundling up the artifacts tar.\n\nIt does so to accelerate the build which is legitimate because we already\ntest the gettext stuff in the `windows-build`/`windows-test` jobs.\n\nThere is nothing \"hotfix\" about this.\n\nCiao,\nJohannes\n\n> > Signed-off-by: Dennis Ameling <dennis@dennisameling.com>\n> > Helped-by: Matthias Aßhauer <mha1993@live.de>\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >  .github/workflows/main.yml | 4 ++--\n> >  1 file changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> > index 0f7516c9ef3..c99628681ef 100644\n> > --- a/.github/workflows/main.yml\n> > +++ b/.github/workflows/main.yml\n> > @@ -159,7 +159,7 @@ jobs:\n> >        shell: bash\n> >        run: |\n> >          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n> > -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> > +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> >      - name: MSBuild\n> >        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n> >      - name: bundle artifact tar\n> > @@ -169,7 +169,7 @@ jobs:\n> >          VCPKG_ROOT: ${{github.workspace}}\\compat\\vcbuild\\vcpkg\n> >        run: |\n> >          mkdir -p artifacts &&\n> > -        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"\n> > +        eval \"$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)\"\n> >      - name: zip up tracked files\n> >        run: git archive -o artifacts/tracked.tar.gz HEAD\n> >      - name: upload tracked files and build artifacts\n>\n>\n>\n"},{"id":"429321","messageId":"xmqqwnq3jlr4.fsf@gitster.g","threadId":"55994","inReplyTo":"2e4db688deb938592257882c06b658cf3b8463f8.1625439315.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v3 1/7] ci: use the new GitHub Action to download git-sdk-64-minimal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-06T19:16:47Z","receivedAt":"2021-07-06T19:16:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> This Action not only downloads and extracts git-sdk-64-minimal _outside_\n> the worktree (making it no longer necessary to meddle with\n> `.gitignore` or `.git/info/exclude`), it also adds the `bash.exe` to the\n> `PATH` and sets the environment variable `MSYSTEM` (an implementation\n> detail that Git's workflow should never have needed to know about).\n>\n> This allows us to convert all those funny PowerShell tasks that wanted\n> to call git-sdk-64-minimal's `bash.exe`: they all are now regular `bash`\n> scriptlets.\n>\n> This finally lets us get rid of the funny quoting and escaping where we\n> had to pay attention not only to quote and escape the Bash scriptlets\n> properly, but also to add a second level of escaping (with backslashes\n> for double quotes and backticks for dollar signs) to stop PowerShell\n> from doing unintended things.\n>\n> Further, this Action uses a fast caching strategy native to GitHub\n> Actions that should accelerate the download across CI runs:\n> git-sdk-64-minimal is usually updated once per 24h, and needs to be\n> cached only once within that period. Caching it (unfortunately only on\n> a per-branch basis) speeds up the download step, and makes it much more\n> robust at the same time by virtue of accessing a cache location that is\n> closer in the network topology.\n\nSo nice.\n"},{"id":"429322","messageId":"xmqqsg0rjlm6.fsf@gitster.g","threadId":"55994","inReplyTo":"2c4cd9dd1c8d966c8df0349bb820449ae1290793.1625439315.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v3 6/7] ci(vs-build): build with NO_GETTEXT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-06T19:19:45Z","receivedAt":"2021-07-06T19:19:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Dennis Ameling via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Dennis Ameling <dennis@dennisameling.com>\n>\n> We already build Git for Windows with `NO_GETTEXT` when compiling with\n> GCC. Let's do the same with Visual C, too.\n>\n> Note that we do not technically _need_ to pass `NO_GETTEXT` explicitly\n> in that `make artifacts-tar` invocation because we do this while `MSVC`\n> is set (which will set `uname_S := Windows`, which in turn will set\n> `NO_GETTEXT = YesPlease`). But it is definitely nicer to be explicit\n> here.\n\nIn other words, is this a no-op but makes the recipe more readable?\n"},{"id":"429377","messageId":"xmqqv95nf2s9.fsf@gitster.g","threadId":"55994","inReplyTo":"pull.878.v3.git.1625439315.gitgitgadget@gmail.com","subject":"Re: [PATCH v3 0/7] ci: speed-up the Windows parts of our GitHub workflow","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-06T23:20:06Z","receivedAt":"2021-07-06T23:20:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> This patch series upgrades to newer versions of a couple GitHub Actions we\n> use, and also streamlines the Windows jobs using the relatively new\n> setup-git-for-windows-sdk Action\n> [https://github.com/marketplace/actions/setup-git-for-windows-sdk] (Git for\n> Windows is running with this Action for a while now, getting all the kinks\n> out).\n>\n> This patch series should also address the problem where seen was pushed so\n> rapidly that the windows-test jobs failed because they no longer checked out\n> the identical revision as the windows-build job.\n>\n> Changes since v2:\n>\n>  * Made the handwaving make [...] NO_GETTEXT comment in the commit message\n>    of the patch \"artifacts-tar: respect NO_GETTEXT\" more explicit, by\n>    setting NO_GETTEXT to a bogus value as required by make.\n>  * Added an explicit NO_GETTEXT=YesPlease to the make artifacts-tar\n>    invocation in the vs-build job, as well as an explanation in the\n>    corresponding commit message why this explicit mention is technically not\n>    required.\n\nThe above indeed helps the CI at GitHub.  The last run with 'seen'\ncan be seen at https://github.com/git/git/actions/runs/1005977569\n\nThanks.\n"},{"id":"429890","messageId":"nycvar.QRO.7.76.6.2107131403040.76@tvgsbejvaqbjf.bet","threadId":"55994","inReplyTo":"87bl7i8ou8.fsf@evledraar.gmail.com","subject":"Re: [PATCH 5/6] ci(vs-build): build with NO_GETTEXT","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-07-13T12:19:32Z","receivedAt":"2021-07-13T12:19:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Sun, 4 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n\n> On Wed, Jun 23 2021, Dennis Ameling via GitGitGadget wrote:\n>\n> > diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> > index 0f7516c9ef..3b40c677ab 100644\n> > --- a/.github/workflows/main.yml\n> > +++ b/.github/workflows/main.yml\n> > @@ -159,7 +159,7 @@ jobs:\n> >        shell: bash\n> >        run: |\n> >          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n> > -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> > +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> >      - name: MSBuild\n> >        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n> >      - name: bundle artifact tar\n>\n> To a first approximation isn't the point of CI to test a diversity of\n> setups?\n\nNo, the point of CI is to find breakages.\n\nAnd in this instance, a careful analysis will reveal that the artifacts\ngenerated via `msgfmt` are not even used, let alone tested.\n\nEven more careful analysis will reveal that Git for Windows does not ship\nwith translations. Therefore, it would be pointless to test the\ntranslations here. Doubly so because Git for Windows is not even built\nusing MSVC, and this `vs-build` job is really about verifying that we can\nbuild with that compiler, and _iff_ we used `msgfmt` here, it would not be\nVisual Studio's (because it doesn't have any `msgfmt`) but the regular one\nfrom Git for Windows' SDK. Triply so because the regular one from Git for\nWindows' SDK _is actually used_ in the `windows-build` job, therefore we\n_really_ do not need to repeat the same exercise with the same gettext\nversion and the same git/git revision in the same GitHub workflow run.\n\nIn short: there is no diversity to be gained here. (Actually, that is not\nquite true: by using gentler language on a first-time contributor instead\nof immediately going into full critic mode without any fanfare, we could\nhave invited more diversity onto this list. Maybe you could pay more\nattention to that in the future?)\n\nBack to the issue you pointed out: could this be described in the commit\nmessage? Sure. But I think there is no much worth in it, the surrounding\ncode and parent commit makes it clear that the `.mo` files aren't used,\nand that it would therefore be a waste of electrons to generate them in\neach and every `vs-build` run.\n\nCiao,\nJohannes\n"},{"id":"429894","messageId":"32d1ae55-669a-c71f-95f9-345fcd42eb87@iee.email","threadId":"55994","inReplyTo":"nycvar.QRO.7.76.6.2107131403040.76@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 5/6] ci(vs-build): build with NO_GETTEXT","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2021-07-13T15:11:14Z","receivedAt":"2021-07-13T15:11:17Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 13/07/2021 13:19, Johannes Schindelin wrote:\n> Hi Ævar,\n>\n> On Sun, 4 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n>\n>> On Wed, Jun 23 2021, Dennis Ameling via GitGitGadget wrote:\n>>\n>>> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n>>> index 0f7516c9ef..3b40c677ab 100644\n>>> --- a/.github/workflows/main.yml\n>>> +++ b/.github/workflows/main.yml\n>>> @@ -159,7 +159,7 @@ jobs:\n>>>        shell: bash\n>>>        run: |\n>>>          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n>>> -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>>> +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>>>      - name: MSBuild\n>>>        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n>>>      - name: bundle artifact tar\n>> To a first approximation isn't the point of CI to test a diversity of\n>> setups?\n> No, the point of CI is to find breakages.\n>\n> And in this instance, a careful analysis will reveal that the artifacts\n> generated via `msgfmt` are not even used, let alone tested.\n>\n> Even more careful analysis will reveal that Git for Windows does not ship\n> with translations. Therefore, it would be pointless to test the\n> translations here. Doubly so because Git for Windows is not even built\n> using MSVC, and this `vs-build` job is really about verifying that we can\n> build with that compiler, and _iff_ we used `msgfmt` here, it would not be\n> Visual Studio's (because it doesn't have any `msgfmt`) but the regular one\n> from Git for Windows' SDK. Triply so because the regular one from Git for\n> Windows' SDK _is actually used_ in the `windows-build` job, therefore we\n> _really_ do not need to repeat the same exercise with the same gettext\n> version and the same git/git revision in the same GitHub workflow run.\n>\n> In short: there is no diversity to be gained here. (Actually, that is not\n> quite true: by using gentler language on a first-time contributor instead\n> of immediately going into full critic mode without any fanfare, we could\n> have invited more diversity onto this list. Maybe you could pay more\n> attention to that in the future?)\n>\n> Back to the issue you pointed out: could this be described in the commit\n> message? Sure. But I think there is no much worth in it, the surrounding\n> code and parent commit makes it clear that the `.mo` files aren't used,\n> and that it would therefore be a waste of electrons to generate them in\n> each and every `vs-build` run.\n>\n> Ciao,\n> Johannes\nFolks,\n\nThis problem (vcpkg/VS/CI build breakage for the tar artifact) has also\njust come up for me on\nhttps://github.com/git-for-windows/git/pull/3306#issuecomment-879093798\n\"[RFC] making Git for Windows start buildins in modern Visual Studio\n#3306\" which is a similar build situation.\n\nHopefully we can chose a suitable solution regarding what, if any, extra\nchecks this part of the CI build ought to do with the (unused in this\nbuild) `.mo` files.\n\n--\nPhilip\n\n"},{"id":"429999","messageId":"87r1g11et1.fsf@evledraar.gmail.com","threadId":"55994","inReplyTo":"nycvar.QRO.7.76.6.2107131403040.76@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 5/6] ci(vs-build): build with NO_GETTEXT","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-07-14T07:54:02Z","receivedAt":"2021-07-14T08:26:52Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Jul 13 2021, Johannes Schindelin wrote:\n\n> Hi Ævar,\n>\n> On Sun, 4 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n>\n>> On Wed, Jun 23 2021, Dennis Ameling via GitGitGadget wrote:\n>>\n>> > diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n>> > index 0f7516c9ef..3b40c677ab 100644\n>> > --- a/.github/workflows/main.yml\n>> > +++ b/.github/workflows/main.yml\n>> > @@ -159,7 +159,7 @@ jobs:\n>> >        shell: bash\n>> >        run: |\n>> >          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n>> > -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>> > +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n>> >      - name: MSBuild\n>> >        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n>> >      - name: bundle artifact tar\n>>\n>> To a first approximation isn't the point of CI to test a diversity of\n>> setups?\n>\n> No, the point of CI is to find breakages.\n>\n> And in this instance, a careful analysis will reveal that the artifacts\n> generated via `msgfmt` are not even used, let alone tested.\n>\n> Even more careful analysis will reveal that Git for Windows does not ship\n> with translations. Therefore, it would be pointless to test the\n> translations here. Doubly so because Git for Windows is not even built\n> using MSVC, and this `vs-build` job is really about verifying that we can\n> build with that compiler, and _iff_ we used `msgfmt` here, it would not be\n> Visual Studio's (because it doesn't have any `msgfmt`) but the regular one\n> from Git for Windows' SDK. [...]\n\nSure, to clarify my comment to Dennis Ameling were to the effect of\n\"hrm, this commit message doesn't seem to justify this change\", not that\nthe change wasn't justified.\n\nI.e. it *read* a bit similar to \"this CI job already uses clang, let's\nchange this job that uses gcc to use it too\", and seemed to take it as a\ngiven that making them consistent was an improvement.\n\nWhich prompted my review to the effect \"hang on a minute, by default we\nwant things different in CI, surely?\".\n\nFrom your explanation here the reason seems closer to (but I'm not sure\nI got all the nuances involved) that the lack of -DNO_GETTEXT=YesPlease\nwas always an omission here, and this change really changes nothing.\n\nBut then isn't this a change that belongs in config.mak.uname since we\nnever use this on this platform? Or do you mean by \"Git for Windows\" the\nconfiguration you build & ship that release in, not \"A Git for Windows\"\nin the sense of what we're building here (which can/does support\ngettext, or not?).\n\n(I see reading on that some of that, i.e. the config.mak.uname\nsuggestion is wrong)....\n\n> [...] Triply so because the regular one from Git for\n> Windows' SDK _is actually used_ in the `windows-build` job, therefore we\n> _really_ do not need to repeat the same exercise with the same gettext\n> version and the same git/git revision in the same GitHub workflow run.\n\n..., okey, So in any case we do test this elsewhere to bring this around\nthe entirety of this thread I think could be addressed by just changing\n\n    We already build Git for Windows with `NO_GETTEXT` when compiling with\n    GCC. Let's do the same with Visual C, too.\n\nTo something like:\n\n    In the XYZ job for Windows we don't need to build with GETTEXT\n    because any coverage gained there is covered by the ABC job. The IJK\n    job on the same platform already builds with -DNO_GETTEXT=YesPlease,\n    let's do the same here.\n\n> In short: there is no diversity to be gained here. (Actually, that is not\n> quite true: by using gentler language on a first-time contributor instead\n> of immediately going into full critic mode without any fanfare, we could\n> have invited more diversity onto this list. Maybe you could pay more\n> attention to that in the future?)\n\nI'll let others judge for themselves but I do think I'm using gentle\nlanguage here, particularly since the quoted \"To a first approximation\nisn't the point[...]\" of mine is immediately followed by (which you\nelided) a:\n\n    \"Perhaps this change makes sense, just commenting on the explanation\n    in the commit message.\"\n\nI.e. I think it's quite clear that I'm commenting on my own confusion,\nnot asserting something about the change itself.\n\n> Back to the issue you pointed out: could this be described in the commit\n> message? Sure. But I think there is no much worth in it, the surrounding\n> code and parent commit makes it clear that the `.mo` files aren't used,\n> and that it would therefore be a waste of electrons to generate them in\n> each and every `vs-build` run.\n\nYes. If we have NO_GETTEXT=Y we shouldn't make the *.mo files and bundle\nthem up in the archive. It's clear from me from this patch & the\nfollowing[1] that we unambiguously end up in a state of NO_GETTEXT=Y.\n\nI was commenting on the \"why\" of that change in the context of assuming\nthat the change made sense, but that the commit message wasn't per-es\njustifying it to someone unfamiliar with the area.\n\nI think your citing of reasons for the change that aren't at all\nmentioned in the commit message supports that.\n\n1. https://lore.kernel.org/git/c31d2e7f44a8b27210dbde9bc6938ce16a9e0c17.1625347592.git.gitgitgadget@gmail.com/\n"},{"id":"430005","messageId":"nycvar.QRO.7.76.6.2107141046130.76@tvgsbejvaqbjf.bet","threadId":"55994","inReplyTo":"xmqqsg0rjlm6.fsf@gitster.g","subject":"Re: [PATCH v3 6/7] ci(vs-build): build with NO_GETTEXT","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-07-14T08:47:15Z","receivedAt":"2021-07-14T08:47:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 6 Jul 2021, Junio C Hamano wrote:\n\n> \"Dennis Ameling via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > From: Dennis Ameling <dennis@dennisameling.com>\n> >\n> > We already build Git for Windows with `NO_GETTEXT` when compiling with\n> > GCC. Let's do the same with Visual C, too.\n> >\n> > Note that we do not technically _need_ to pass `NO_GETTEXT` explicitly\n> > in that `make artifacts-tar` invocation because we do this while `MSVC`\n> > is set (which will set `uname_S := Windows`, which in turn will set\n> > `NO_GETTEXT = YesPlease`). But it is definitely nicer to be explicit\n> > here.\n>\n> In other words, is this a no-op but makes the recipe more readable?\n\nYes. And it also removes some puzzlement from the thorough reviewer\n(Matthias stumbled over it and was wondering why this even works without\n`NO_GETTEXT`).\n\nThanks,\nDscho\n"},{"id":"430006","messageId":"nycvar.QRO.7.76.6.2107141049420.76@tvgsbejvaqbjf.bet","threadId":"55994","inReplyTo":"32d1ae55-669a-c71f-95f9-345fcd42eb87@iee.email","subject":"Re: [PATCH 5/6] ci(vs-build): build with NO_GETTEXT","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-07-14T08:51:29Z","receivedAt":"2021-07-14T08:51:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Philip,\n\nOn Tue, 13 Jul 2021, Philip Oakley wrote:\n\n> On 13/07/2021 13:19, Johannes Schindelin wrote:\n> >\n> > On Sun, 4 Jul 2021, Ævar Arnfjörð Bjarmason wrote:\n> >\n> >> On Wed, Jun 23 2021, Dennis Ameling via GitGitGadget wrote:\n> >>\n> >>> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> >>> index 0f7516c9ef..3b40c677ab 100644\n> >>> --- a/.github/workflows/main.yml\n> >>> +++ b/.github/workflows/main.yml\n> >>> @@ -159,7 +159,7 @@ jobs:\n> >>>        shell: bash\n> >>>        run: |\n> >>>          cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \\\n> >>> -        -DMSGFMT_EXE=C:/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> >>> +        -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON\n> >>>      - name: MSBuild\n> >>>        run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142\n> >>>      - name: bundle artifact tar\n> >> To a first approximation isn't the point of CI to test a diversity of\n> >> setups?\n> > No, the point of CI is to find breakages.\n>\n> This problem (vcpkg/VS/CI build breakage for the tar artifact) has also\n> just come up for me on\n> https://github.com/git-for-windows/git/pull/3306#issuecomment-879093798\n> \"[RFC] making Git for Windows start buildins in modern Visual Studio\n> #3306\" which is a similar build situation.\n>\n> Hopefully we can chose a suitable solution regarding what, if any, extra\n> checks this part of the CI build ought to do with the (unused in this\n> build) `.mo` files.\n\nYou will be happy to hear that the fix was in v2 of this patch series (you\nresponded to v1).\n\nCiao,\nDscho\n"}]}