Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: git-for-windows/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
Loading
Showing with 24,795 additions and 2,780 deletions.
  1. +1 −0 .gitattributes
  2. +64 −0 .github/ISSUE_TEMPLATE.md
  3. +16 −4 .github/PULL_REQUEST_TEMPLATE.md
  4. +13 −0 .github/dependabot.yml
  5. +10 −7 .github/workflows/main.yml
  6. +99 −0 .github/workflows/monitor-components.yml
  7. +76 −0 .github/workflows/nano-server.yml
  8. +2 −0 .gitignore
  9. +116 −0 ARCHITECTURE.md
  10. +26 −32 CODE_OF_CONDUCT.md
  11. +417 −0 CONTRIBUTING.md
  12. +8 −0 Documentation/config.adoc
  13. +7 −0 Documentation/config/advice.adoc
  14. +19 −6 Documentation/config/core.adoc
  15. +4 −0 Documentation/config/feature.adoc
  16. +12 −5 Documentation/config/http.adoc
  17. +8 −0 Documentation/config/pack.adoc
  18. +5 −0 Documentation/config/sendpack.adoc
  19. +16 −0 Documentation/config/sideband.adoc
  20. +14 −0 Documentation/config/survey.adoc
  21. +4 −0 Documentation/config/windows.adoc
  22. +11 −1 Documentation/git-pack-objects.adoc
  23. +13 −1 Documentation/git-repack.adoc
  24. +11 −0 Documentation/git-reset.adoc
  25. +83 −0 Documentation/git-survey.adoc
  26. +30 −0 Documentation/gitattributes.adoc
  27. +1 −0 Documentation/meson.build
  28. +1 −0 Documentation/technical/api-path-walk.adoc
  29. +72 −8 Makefile
  30. +76 −2 README.md
  31. +35 −21 SECURITY.md
  32. +3 −0 abspath.c
  33. +2 −0 advice.c
  34. +2 −0 advice.h
  35. +1 −1 apply.c
  36. +1 −0 builtin.h
  37. +5 −0 builtin/add.c
  38. +2 −0 builtin/checkout.c
  39. +42 −0 builtin/clean.c
  40. +2 −0 builtin/commit.c
  41. +1 −1 builtin/credential-cache.c
  42. +1 −1 builtin/difftool.c
  43. +369 −33 builtin/pack-objects.c
  44. +6 −1 builtin/repack.c
  45. +16 −0 builtin/reset.c
  46. +933 −0 builtin/survey.c
  47. +1 −1 ci/install-dependencies.sh
  48. +5 −5 ci/run-build-and-tests.sh
  49. +3 −5 ci/run-test-slice.sh
  50. +1 −0 command-list.txt
  51. +7 −0 common-exit.c
  52. +1 −0 compat/.gitattributes
  53. +13 −1 compat/bswap.h
  54. +3 −3 compat/fsmonitor/fsm-health-win32.c
  55. +9 −9 compat/fsmonitor/fsm-listen-win32.c
  56. +4 −4 compat/fsmonitor/fsm-path-utils-win32.c
  57. +418 −0 compat/lazyload-curl.c
  58. +21 −0 compat/mimalloc/LICENSE
  59. +360 −0 compat/mimalloc/alloc-aligned.c
  60. +691 −0 compat/mimalloc/alloc.c
  61. +346 −0 compat/mimalloc/arena-abandon.c
  62. +1,044 −0 compat/mimalloc/arena.c
  63. +441 −0 compat/mimalloc/bitmap.c
  64. +119 −0 compat/mimalloc/bitmap.h
  65. +569 −0 compat/mimalloc/free.c
  66. +735 −0 compat/mimalloc/heap.c
  67. +720 −0 compat/mimalloc/init.c
  68. +334 −0 compat/mimalloc/libc.c
  69. +103 −0 compat/mimalloc/mimalloc-stats.h
  70. +609 −0 compat/mimalloc/mimalloc.h
  71. +554 −0 compat/mimalloc/mimalloc/atomic.h
  72. +1,120 −0 compat/mimalloc/mimalloc/internal.h
  73. +419 −0 compat/mimalloc/mimalloc/prim.h
  74. +145 −0 compat/mimalloc/mimalloc/track.h
  75. +707 −0 compat/mimalloc/mimalloc/types.h
  76. +663 −0 compat/mimalloc/options.c
  77. +713 −0 compat/mimalloc/os.c
  78. +390 −0 compat/mimalloc/page-queue.c
  79. +1,043 −0 compat/mimalloc/page.c
  80. +9 −0 compat/mimalloc/prim/osx/prim.c
  81. +76 −0 compat/mimalloc/prim/prim.c
  82. +907 −0 compat/mimalloc/prim/unix/prim.c
  83. +825 −0 compat/mimalloc/prim/windows/prim.c
  84. +258 −0 compat/mimalloc/random.c
  85. +142 −0 compat/mimalloc/segment-map.c
  86. +1,701 −0 compat/mimalloc/segment.c
  87. +629 −0 compat/mimalloc/stats.c
  88. +1,438 −346 compat/mingw.c
  89. +113 −10 compat/mingw.h
  90. +58 −0 compat/terminal.c
  91. +14 −20 compat/vcbuild/README
  92. +7 −0 compat/vcbuild/find_vs_env.bat
  93. +19 −1 compat/vcbuild/scripts/clink.pl
  94. +46 −0 compat/vcbuild/scripts/rc.pl
  95. +6 −1 compat/vcbuild/vcpkg_copy_dlls.bat
  96. +54 −3 compat/vcbuild/vcpkg_install.bat
  97. +1 −11 compat/win32.h
  98. +58 −42 compat/win32/dirent.c
  99. +21 −7 compat/win32/dirent.h
  100. +165 −0 compat/win32/exit-process.h
  101. +820 −0 compat/win32/fscache.c
  102. +36 −0 compat/win32/fscache.h
  103. +131 −0 compat/win32/ntifs.h
  104. +199 −0 compat/win32/path-utils.c
  105. +3 −0 compat/win32/path-utils.h
  106. +3 −3 compat/win32/pthread.c
  107. +5 −3 compat/win32/pthread.h
  108. +142 −0 compat/win32/wsl.c
  109. +12 −0 compat/win32/wsl.h
  110. +49 −0 compat/winansi.c
  111. +2 −2 config.c
  112. +2 −0 config.h
  113. +2 −0 config.mak.dev
  114. +77 −88 config.mak.uname
  115. +41 −12 contrib/buildsystems/CMakeLists.txt
  116. +0 −42 contrib/buildsystems/Generators.pm
  117. +0 −189 contrib/buildsystems/Generators/QMake.pm
  118. +0 −579 contrib/buildsystems/Generators/Vcproj.pm
  119. +0 −402 contrib/buildsystems/Generators/Vcxproj.pm
  120. +0 −395 contrib/buildsystems/engine.pl
  121. +0 −29 contrib/buildsystems/generate
  122. +0 −228 contrib/buildsystems/parse.pl
  123. +1 −1 contrib/subtree/Makefile
  124. +52 −9 dir.c
  125. +8 −0 editor.c
  126. +4 −1 entry.c
  127. +12 −0 environment.c
  128. +2 −0 fetch-pack.c
  129. +32 −2 fsmonitor-settings.c
  130. +79 −1 git-compat-util.h
  131. +8 −0 git-curl-compat.h
  132. +2 −0 git-gui/Makefile
  133. +68 −0 git-gui/git-gui--askyesno
  134. +11 −0 git-gui/git-gui.sh
  135. +8 −4 git-gui/lib/diff.tcl
  136. +24 −11 git-sh-setup.sh
  137. +1 −0 git.c
  138. +2 −0 git.rc.in
  139. +2 −0 grep.c
  140. +41 −5 http.c
  141. +2 −2 lockfile.c
  142. +10 −0 mem-pool.c
  143. +1 −1 merge-recursive.c
  144. +3 −0 meson.build
  145. +15 −15 object-file.c
  146. +3 −3 object-store-ll.h
  147. +12 −0 pack-objects.h
  148. +1 −0 parallel-checkout.c
  149. +59 −3 path.c
  150. +1 −0 path.h
  151. +5 −0 preload-index.c
  152. +1 −1 prompt.c
  153. +13 −0 read-cache.c
  154. +1 −1 refs/files-backend.c
  155. +3 −0 repo-settings.c
  156. +1 −0 repo-settings.h
  157. +1 −1 repository.c
  158. +15 −0 revision.c
  159. +1 −0 revision.h
  160. +1 −0 run-command.c
  161. +1 −0 scalar.c
  162. +3 −3 send-pack.c
  163. +13 −4 setup.c
  164. +1 −2 sha1dc_git.c
  165. +1 −1 sha1dc_git.h
  166. +76 −2 sideband.c
  167. +4 −6 strbuf.c
  168. +7 −0 t/README
  169. +1 −0 t/helper/meson.build
  170. +47 −0 t/helper/test-iconv.c
  171. +1 −0 t/helper/test-tool.c
  172. +1 −0 t/helper/test-tool.h
  173. +6 −2 t/interop/interop-lib.sh
  174. BIN t/{ → lib-diff}/test-binary-1.png
  175. BIN t/{ → lib-diff}/test-binary-2.png
  176. +1 −1 t/lib-proto-disable.sh
  177. +6 −0 t/meson.build
  178. +25 −0 t/perf/p5313-pack-objects.sh
  179. +4 −4 t/t0014-alias.sh
  180. +1 −1 t/t0021-conversion.sh
  181. +52 −13 t/t0060-path-utils.sh
  182. +3 −3 t/t0061-run-command.sh
  183. +1 −1 t/t0300-credentials.sh
  184. +1 −1 t/t0301-credential-cache.sh
  185. +6 −0 t/t0411-clone-from-partial.sh
  186. +39 −0 t/t1007-hash-object.sh
  187. +20 −0 t/t1090-sparse-checkout-scope.sh
  188. +5 −5 t/t1504-ceiling-dirs.sh
  189. +111 −0 t/t2031-checkout-long-paths.sh
  190. +46 −0 t/t2040-checkout-symlink-attr.sh
  191. +1 −1 t/t2300-cd-to-toplevel.sh
  192. +1 −1 t/t3307-notes-man.sh
  193. +2 −2 t/t3418-rebase-continue.sh
  194. +11 −0 t/t3700-add.sh
  195. +21 −0 t/t3701-add-interactive.sh
  196. +1 −1 t/t3903-stash.sh
  197. +1 −1 t/t4012-diff-binary.sh
  198. +1 −1 t/t4049-diff-stat-count.sh
  199. +6 −6 t/t4108-apply-threeway.sh
  200. +1 −1 t/t5003-archive-zip.sh
  201. +21 −0 t/t5300-pack-object.sh
  202. +5 −0 t/t5306-pack-nobase.sh
  203. +11 −2 t/t5310-pack-bitmaps.sh
  204. +6 −3 t/t5316-pack-delta-depth.sh
  205. +7 −0 t/t5332-multi-pack-reuse.sh
  206. +30 −0 t/t5409-colorize-remote-messages.sh
  207. +5 −5 t/t5505-remote.sh
  208. +9 −9 t/t5516-fetch-push.sh
  209. +1 −1 t/t5532-fetch-proxy.sh
  210. +9 −1 t/t5551-http-fetch-smart.sh
  211. +14 −5 t/t5580-unc-paths.sh
  212. +17 −0 t/t5601-clone.sh
  213. +15 −0 t/t5605-clone-local.sh
  214. +2 −2 t/t5615-alternate-env.sh
  215. +1 −1 t/t5801-remote-helpers.sh
  216. +1 −1 t/t5802-connect-helper.sh
  217. +17 −2 t/t5813-proto-disable-ssh.sh
  218. +2 −2 t/t6403-merge-file.sh
  219. +1 −1 t/t6407-merge-binary.sh
  220. +2 −2 t/t7006-pager.sh
  221. +32 −0 t/t7108-reset-stdin.sh
  222. +36 −0 t/t7201-co.sh
  223. +10 −0 t/t7300-clean.sh
  224. +12 −0 t/t7406-submodule-update.sh
  225. +110 −0 t/t7429-submodule-long-path.sh
  226. +42 −0 t/t7502-commit-porcelain.sh
  227. +1 −1 t/t7606-merge-custom.sh
  228. +1 −1 t/t7811-grep-open.sh
  229. +103 −0 t/t8100-git-survey.sh
  230. +1 −1 t/t9003-help-autocorrect.sh
  231. +14 −7 t/t9200-git-cvsexportcommit.sh
  232. +11 −0 t/t9350-fast-export.sh
  233. +1 −1 t/t9800-git-p4-basic.sh
  234. +1 −6 t/t9902-completion.sh
  235. +60 −33 t/test-lib.sh
  236. +72 −0 t/unit-tests/u-mingw.c
  237. +26 −0 transport-helper.c
  238. +1 −1 unix-socket.c
  239. +2 −0 unpack-trees.c
  240. +10 −3 wt-status.c
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
*.pm text eol=lf diff=perl
*.py text eol=lf diff=python
*.bat text eol=crlf
*.png binary
CODE_OF_CONDUCT.md -whitespace
/Documentation/**/*.adoc text eol=lf
/command-list.txt text eol=lf
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
- [ ] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing

### Setup

- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

```
$ git --version --build-options
** insert your machine's response here **
```

- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?

```
$ cmd.exe /c ver
** insert your machine's response here **
```

- What options did you set as part of the installation? Or did you choose the
defaults?

```
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
** insert your machine's response here **
```

- Any other interesting things about your environment that might be related
to the issue you're seeing?

** insert your response here **

### Details

- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

** insert your response here **

- What commands did you run to trigger this issue? If you can provide a
[Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)
this will help us understand the issue.

```
** insert your commands here **
```
- What did you expect to occur after running these commands?

** insert here **

- What actually happened instead?

** insert here **

- If the problem was occurring with a specific repository, can you provide the
URL to that repository to help us with testing?

** insert URL here **
20 changes: 16 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
Thanks for taking the time to contribute to Git! Please be advised that the
Git community does not use github.com for their contributions. Instead, we use
a mailing list (git@vger.kernel.org) for code submissions, code reviews, and
bug reports. Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
Thanks for taking the time to contribute to Git!

Those seeking to contribute to the Git for Windows fork should see
http://gitforwindows.org/#contribute on how to contribute Windows specific
enhancements.

If your contribution is for the core Git functions and documentation
please be aware that the Git community does not use the github.com issues
or pull request mechanism for their contributions.

Instead, we use the Git mailing list (git@vger.kernel.org) for code and
documentation submissions, code reviews, and bug reports. The
mailing list is plain text only (anything with HTML is sent directly
to the spam folder).

Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
to conveniently send your Pull Requests commits to our mailing list.

For a single-commit pull request, please *leave the pull request description
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
# especially
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
17 changes: 10 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -169,8 +169,11 @@ jobs:
NO_PERL: 1
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
runs-on: windows-latest
strategy:
matrix:
arch: [x64, arm64]
concurrency:
group: vs-build-${{ github.ref }}
group: vs-build-${{ github.ref }}-${{ matrix.arch }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v4
@@ -189,14 +192,14 @@ jobs:
uses: microsoft/setup-msbuild@v2
- name: copy dlls to root
shell: cmd
run: compat\vcbuild\vcpkg_copy_dlls.bat release
run: compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows
- name: generate Visual Studio solution
shell: bash
run: |
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows -DHOST_CPU=${{ matrix.arch }}
- name: MSBuild
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
run: msbuild git.sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4 -property:PlatformToolset=v142
- name: bundle artifact tar
shell: bash
env:
@@ -210,7 +213,7 @@ jobs:
- name: upload tracked files and build artifacts
uses: actions/upload-artifact@v4
with:
name: vs-artifacts
name: vs-artifacts-${{ matrix.arch }}
path: artifacts
vs-test:
name: win+VS test
@@ -228,7 +231,7 @@ jobs:
- name: download tracked files and build artifacts
uses: actions/download-artifact@v4
with:
name: vs-artifacts
name: vs-artifacts-x64
path: ${{github.workspace}}
- name: extract tracked files and build artifacts
shell: bash
99 changes: 99 additions & 0 deletions .github/workflows/monitor-components.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Monitor component updates

# Git for Windows is a slightly modified subset of MSYS2. Some of its
# components are maintained by Git for Windows, others by MSYS2. To help
# keeping the former up to date, this workflow monitors the Atom/RSS feeds
# and opens new tickets for each new component version.

on:
schedule:
- cron: "23 8,11,14,17 * * *"
workflow_dispatch:

env:
CHARACTER_LIMIT: 5000
MAX_AGE: 7d

jobs:
job:
# Only run this in Git for Windows' fork
if: github.event.repository.owner.login == 'git-for-windows'
runs-on: ubuntu-latest
permissions:
issues: write
strategy:
matrix:
component:
- label: git
feed: https://github.com/git/git/tags.atom
- label: git-lfs
feed: https://github.com/git-lfs/git-lfs/tags.atom
- label: git-credential-manager
feed: https://github.com/git-ecosystem/git-credential-manager/tags.atom
- label: tig
feed: https://github.com/jonas/tig/tags.atom
- label: cygwin
feed: https://github.com/cygwin/cygwin/releases.atom
title-pattern: ^(?!.*newlib)
- label: msys2-runtime-package
feed: https://github.com/msys2/MSYS2-packages/commits/master/msys2-runtime.atom
- label: msys2-runtime
feed: https://github.com/msys2/msys2-runtime/commits/HEAD.atom
aggregate: true
- label: openssh
feed: https://github.com/openssh/openssh-portable/tags.atom
- label: libfido2
feed: https://github.com/Yubico/libfido2/tags.atom
- label: libcbor
feed: https://github.com/PJK/libcbor/tags.atom
- label: openssl
feed: https://github.com/openssl/openssl/tags.atom
title-pattern: ^(?!.*alpha)
- label: gnutls
feed: https://gnutls.org/news.atom
- label: heimdal
feed: https://github.com/heimdal/heimdal/tags.atom
- label: git-sizer
feed: https://github.com/github/git-sizer/tags.atom
- label: gitflow
feed: https://github.com/petervanderdoes/gitflow-avh/tags.atom
- label: curl
feed: https://github.com/curl/curl/tags.atom
title-pattern: ^(?!rc-)
- label: libgpg-error
feed: https://github.com/gpg/libgpg-error/releases.atom
title-pattern: ^libgpg-error-[0-9\.]*$
- label: libgcrypt
feed: https://github.com/gpg/libgcrypt/releases.atom
title-pattern: ^libgcrypt-[0-9\.]*$
- label: gpg
feed: https://github.com/gpg/gnupg/releases.atom
- label: mintty
feed: https://github.com/mintty/mintty/releases.atom
- label: 7-zip
feed: https://sourceforge.net/projects/sevenzip/rss?path=/7-Zip
aggregate: true
- label: bash
feed: https://git.savannah.gnu.org/cgit/bash.git/atom/?h=master
aggregate: true
- label: perl
feed: https://github.com/Perl/perl5/tags.atom
title-pattern: ^(?!.*(5\.[0-9]+[13579]|RC))
- label: pcre2
feed: https://github.com/PCRE2Project/pcre2/tags.atom
- label: mingw-w64-llvm
feed: https://github.com/msys2/MINGW-packages/commits/master/mingw-w64-llvm.atom
- label: innosetup
feed: https://github.com/jrsoftware/issrc/tags.atom
fail-fast: false
steps:
- uses: git-for-windows/rss-to-issues@v0
with:
feed: ${{matrix.component.feed}}
prefix: "[New ${{matrix.component.label}} version]"
labels: component-update
github-token: ${{ secrets.GITHUB_TOKEN }}
character-limit: ${{ env.CHARACTER_LIMIT }}
max-age: ${{ env.MAX_AGE }}
aggregate: ${{matrix.component.aggregate}}
title-pattern: ${{matrix.component.title-pattern}}
76 changes: 76 additions & 0 deletions .github/workflows/nano-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Windows Nano Server tests

on:
workflow_dispatch:

env:
DEVELOPER: 1

jobs:
test-nano-server:
runs-on: windows-2022
env:
WINDBG_DIR: "C:/Program Files (x86)/Windows Kits/10/Debuggers/x64"
IMAGE: mcr.microsoft.com/powershell:nanoserver-ltsc2022

steps:
- uses: actions/checkout@v4
- uses: git-for-windows/setup-git-for-windows-sdk@v1
- name: build Git
shell: bash
run: make -j15
- name: pull nanoserver image
shell: bash
run: docker pull $IMAGE
- name: run nano-server test
shell: bash
run: |
docker run \
--user "ContainerAdministrator" \
-v "$WINDBG_DIR:C:/dbg" \
-v "$(cygpath -aw /mingw64/bin):C:/mingw64-bin" \
-v "$(cygpath -aw .):C:/test" \
$IMAGE pwsh.exe -Command '
# Extend the PATH to include the `.dll` files in /mingw64/bin/
$env:PATH += ";C:\mingw64-bin"
# For each executable to test pick some no-operation set of
# flags/subcommands or something that should quickly result in an
# error with known exit code that is not a negative 32-bit
# number, and set the expected return code appropriately.
#
# Only test executables that could be expected to run in a UI
# less environment.
#
# ( Executable path, arguments, expected return code )
# also note space is required before close parenthesis (a
# powershell quirk when defining nested arrays like this)
$executables_to_test = @(
("C:\test\git.exe", "", 1 ),
("C:\test\scalar.exe", "version", 0 )
)
foreach ($executable in $executables_to_test)
{
Write-Output "Now testing $($executable[0])"
&$executable[0] $executable[1]
if ($LASTEXITCODE -ne $executable[2]) {
# if we failed, run the debugger to find out what function
# or DLL could not be found and then exit the script with
# failure The missing DLL or EXE will be referenced near
# the end of the output
# Set a flag to have the debugger show loader stub
# diagnostics. This requires running as administrator,
# otherwise the flag will be ignored.
C:\dbg\gflags -i $executable[0] +SLS
C:\dbg\cdb.exe -c "g" -c "q" $executable[0] $executable[1]
exit 1
}
}
exit 0
'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -165,6 +165,7 @@
/git-submodule
/git-submodule--helper
/git-subtree
/git-survey
/git-svn
/git-switch
/git-symbolic-ref
@@ -251,5 +252,6 @@ Release/
/git.VC.db
*.dSYM
/contrib/buildsystems/out
CMakeSettings.json
/contrib/libgit-rs/target
/contrib/libgit-sys/target
Loading