Skip to content

Conversation

@mjcheetham
Copy link
Member

Range diff relative to main:

  1:  11e5c1a6c9 =   1:  93deb77118 windows: ignore empty `PATH` elements
  2:  652d0ae241 =   2:  dcce099324 is_Cygwin: avoid `exec`ing anything
  3:  38b32f1df8 =   3:  43b9f3b889 Move is_<platform> functions to the beginning
  4:  56c271cd88 =   4:  7e19503b13 Move the `_which` function (almost) to the top
  5:  c45feb711b =   5:  262b7fccd7 Work around Tcl's default `PATH` lookup
  6:  2ef7ac49b5 =   6:  9fec2c56cb gitk(Windows): avoid inadvertently calling executables in the worktree
  7:  1b98f33b33 =   7:  2c45054f59 t9350: point out that refs are not updated correctly
  8:  3f83b2598e =   8:  093da28aee transport-helper: add trailing --
  9:  88d859a346 =   9:  b3f7ffb2f0 remote-helper: check helper status after import/export
 12:  102981f5eb =  10:  29033a7783 Always auto-gc after calling a fast-import transport
 14:  04c05d01d9 =  11:  68bcbf9659 mingw: include the Python parts in the build
 15:  2b2f644650 =  12:  4c1be4de47 win32/pthread: avoid name clashes with winpthread
 16:  b3431d4ea4 =  13:  3ed5b49b03 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 10:  3cf6cd1aaf =  14:  62668ef774 mingw: demonstrate a problem with certain absolute paths
 11:  8e17eb72d6 =  15:  97db969ae7 clean: do not traverse mount points
 17:  dcc9e4cc44 =  16:  b527a1d0c8 Import the source code of mimalloc v2.0.9
 13:  352fb74fd6 =  17:  b4dabeec38 mingw: allow absolute paths without drive prefix
 18:  4fc0747f48 =  18:  a29dc8a689 clean: remove mount points when possible
 19:  0476f6ca96 =  19:  3c9efc4a18 mimalloc: adjust for building inside Git
 20:  ae5271f4a7 =  20:  554b9ca0c4 mimalloc: offer a build-time option to enable it
 21:  1ab3b65c41 =  21:  13dd0f7d8a mimalloc: use "weak" random seed when statically linked
 22:  29ab7978b8 =  22:  7b9d3c09f4 mingw: use mimalloc
 23:  177eb9afce =  23:  bf20e9d5c7 Config option to disable side-band-64k for transport
 24:  1a53f28a98 =  24:  7691240c8d mingw: make sure `errno` is set correctly when socket operations fail
 25:  3a979281a3 =  25:  4a4bda0d4f mingw: do resolve symlinks in `getcwd()`
 26:  81dbbcebd9 =  26:  d9ee6f1a84 mingw: fix fatal error working on mapped network drives on Windows
 29:  7fc859f22d =  27:  bea455fd28 clink.pl: fix MSVC compile script to handle libcurl-d.lib
 31:  be3afaf335 =  28:  677729f237 mingw: ensure valid CTYPE
 27:  7363ffdaa7 =  29:  2b7a221f35 mingw: demonstrate a `git add` issue with NTFS junctions
 32:  dff373849a =  30:  ba60bb7880 vcxproj: unclash project directories with build outputs
 33:  7f611a09f1 =  31:  f1d296b8cd mingw: allow `git.exe` to be used instead of the "Git wrapper"
 28:  e9c76176d9 =  32:  aa1a791cf1 strbuf_realpath(): use platform-dependent API if available
 34:  b168cddfd9 =  33:  78af2336b8 t5505/t5516: allow running without `.git/branches/` in the templates
 35:  ee8c019053 =  34:  324ab16282 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 36:  ee1cefb837 =  35:  61341a6ebb http: use new "best effort" strategy for Secure Channel revoke checking
 30:  03e5575614 =  36:  5b3c9c9c07 mingw: implement a platform-specific `strbuf_realpath()`
 37:  a54dde58e9 =  37:  56fb137bb5 t5505/t5516: fix white-space around redirectors
 38:  667eee2be0 =  38:  a7702815a9 t3701: verify that we can add *lots* of files interactively
 39:  8daeae1ac8 =  39:  e04240c281 git add -i: handle CR/LF line endings in the interactive input
 40:  8a8473ae94 =  40:  da8699a16d commit: accept "scissors" with CR/LF line endings
 41:  46815a99ae =  41:  e8c90f6326 t0014: fix indentation
 42:  e099d3bbf8 =  42:  2c55853176 git-gui: accommodate for intent-to-add files
 43:  85157f8106 =  43:  7d788896ac clink.pl: fix libexpatd.lib link error when using MSVC
 44:  d303f1ebce =  44:  c04089f253 Makefile: clean up .ilk files when MSVC=1
 45:  96596caead =  45:  3a9b8c169c vcbuild: add support for compiling Windows resource files
 46:  dffea57b9c =  46:  59c45d1c29 config.mak.uname: add git.rc to MSVC builds
 47:  349962ae37 =  47:  fa3f0b2a48 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 48:  42ea893cb4 =  48:  fbbab51a82 clink.pl: move default linker options for MSVC=1 builds
 49:  52e0880890 =  49:  c0cf9e8fc3 buildsystems: remove duplicate clause
 50:  221f836d8e =  50:  79af9e682d vcxproj: handle resource files, too
 51:  d0b07b82e5 =  51:  23d18e4800 vcxproj: ignore -fno-stack-protector and -fno-common
 56:  9d2d6dd86b =  52:  fdc27327e1 vcpkg_install: detect lack of Git
 57:  56acc624c1 =  53:  b61f285a66 vcpkg_install: add comment regarding slow network connections
 58:  f66e1d4f6e =  54:  372f6ad405 vcxproj: support building Windows/ARM64 binaries
 52:  40b7276568 =  55:  13f106ec65 vcxproj: handle GUI programs, too
 59:  f6b6f5c847 =  56:  73a4d2fbba vcbuild: install ARM64 dependencies when building ARM64 binaries
 53:  4507373f91 =  57:  f411651d27 win32: add a helper to run `git.exe` without a foreground window
 60:  d2bdbe7620 =  58:  c678c3c4f6 vcbuild: add an option to install individual 'features'
 54:  18a68ea614 =  59:  0ef4afdaa1 git maintenance: avoid console window in scheduled tasks on Windows
 61:  8dda1d2763 =  60:  01704b5905 cmake: allow building for Windows/ARM64
 55:  e0506bc01d =  61:  7a1b782f62 cmake: install headless-git.
 62:  214e3cd210 =  62:  acb81dbb5b ci(vs-build) also build Windows/ARM64 artifacts
 63:  c09d14299a =  63:  4023ab1008 Add schannel to curl installation
 71:  bd6496131c =  64:  9555abec1c subtree: update `contrib/subtree` `test` target
 64:  f16ec5e458 =  65:  4c0a4a9ab9 cmake(): allow setting HOST_CPU for cross-compilation
 65:  c8df8c0c73 =  66:  269f1a1f0e ci(vs-build): download the vcpkg artifacts using a dedicated Action
 66:  50d551d818 =  67:  0bbe6223c8 mingw: allow for longer paths in `parse_interpreter()`
 67:  12dc57acd2 =  68:  d7b762a557 compat/vcbuild: document preferred way to build in Visual Studio
 68:  d0a487bf8d =  69:  bccb9e70e7 http: optionally send SSL client certificate
 73:  e18c0ab3a0 =  70:  46578acbc7 ci: run `contrib/subtree` tests in CI builds
 69:  0394077742 =  71:  107e29a9e7 CMake: default Visual Studio generator has changed
 76:  c04e368bcf =  72:  5115238cf8 hash-object: demonstrate a >4GB/LLP64 problem
 70:  a4d218f941 =  73:  7d86aaf08a .gitignore: add Visual Studio CMakeSetting.json file
 77:  68831bb7c5 =  74:  60c04afffa hash_object_file_literally(): use size_t
 72:  b5e4daf6a2 =  75:  31b9681a6a CMakeLists: add default "x64-windows" arch for Visual Studio
 78:  ae852158a3 =  76:  f31959d0c1 object-file.c: use size_t for header lengths
 74:  dc0834d032 =  77:  7ebf6f2b48 CMake: show Win32 and Generator_platform build-option values
 75:  ca81b777fd =  78:  4cafe5b811 init: do parse _all_ core.* settings early
 82:  450fdfb51a =  79:  51ea61ef3b Enable the built-in FSMonitor as an experimental feature
 79:  251a369e06 =  80:  a87f83a901 hash algorithms: use size_t for section lengths
 80:  4b3464e717 =  81:  585bb5d73f hash-object --stdin: verify that it works with >4GB/LLP64
 81:  eee7353478 =  82:  6344040da8 hash-object: add another >4GB/LLP64 test case
 84:  facab57837 =  83:  8eb9bb2883 setup: properly use "%(prefix)/" when in WSL
 85:  d4ffd66b8d =  84:  f2faaafddd Add config option `windows.appendAtomically`
 83:  df768c7a89 =  85:  2db4ab3dee hash-object: add a >4GB/LLP64 test case using filtered input
 86:  06cc7d82d6 =  86:  a3dd0bcc9f compat/mingw.c: do not warn when failing to get owner
 87:  d11f1c2665 =  87:  220e95f589 mingw: $env:TERM="xterm-256color" for newer OSes
 88:  6b1b983ca4 =  88:  db272b6c27 winansi: check result and Buffer before using Name
 89:  8a10983a62 =  89:  874601760c mingw: change core.fsyncObjectFiles = 1 by default
 90:  94dce230dd =  90:  91ff5692b3 vcxproj: allow building with `NO_PERL` again
 91:  16bf7bc444 =  91:  f51cd73920 vcxproj: require C11
 92:  93c88ccd7a =  92:  23f5c84b53 vcxproj: ignore the `-pedantic` option
 93:  b717dd3201 =  93:  170db65a58 vcxproj: include reftable when committing `.vcxproj` files
 94:  646d1037ea =  94:  fdfc5aed93 vcxproj: handle libreftable_test, too
 95:  773e582c2d =  95:  02d2977d55 vcxproj: avoid escaping double quotes in the defines
 96:  672b030af4 =  96:  5c7aebf87c ci: adjust Azure Pipeline for `runs_on_pool`
 97:  c045177027 =  97:  ab6345cef2 ci: stop linking the `prove` cache
 98:  61c9341a37 =  98:  92f8086ede ci: reinstate Azure Pipelines support
 99:  b9104c9031 =  99:  ed5deb166e azure-pipeline: drop the `GETTEXT_POISON` job
100:  590b3086f6 = 100:  bba23ce387 azure-pipeline: stop hard-coding `apt-get` calls
101:  e570e0c880 = 101:  e00d24a795 azure-pipeline: drop the code to write to/read from a file share
102:  ce01e6cdb4 = 102:  c5202db628 azure-pipeline: use partial clone/parallel checkout to initialize minimal-sdk
104:  f92b5a3f85 = 103:  2dd5fab2e0 azure-pipeline: downcase the job name of the `Linux32` job
103:  7ce55efc3a = 104:  a4a3fb934a bswap.h: add support for built-in bswap functions
106:  9847615281 = 105:  3fcad41926 config.mak.uname: add support for clangarm64
105:  49ec03ca47 = 106:  0b81fade6a MinGW: link as terminal server aware
107:  af8d06e9c9 = 107:  f41f3b2bf2 azure-pipeline: run static-analysis on jammy
108:  5cd38d6f2a = 108:  08e9b072f1 Fix Windows version resources
112:  e99ab11087 = 109:  7ec4f13f94 ci: create clangarm64-build.yml
113:  74d51b4b75 = 110:  dd2ea10cea status: fix for old-style submodules with commondir
114:  97f50cb042 = 111:  c3ca238042 windows: skip linking `git-<command>` for built-ins
109:  9072a99741 = 112:  c389eb9bca http: optionally load libcurl lazily
110:  a96b932f75 = 113:  db2c476a5a http: support lazy-loading libcurl also on Windows
111:  0e6ba54459 = 114:  83acbebd80 http: when loading libcurl lazily, allow for multiple SSL backends
115:  a4c885096d = 115:  e493c1acb4 windows: fix Repository>Explore Working Copy
116:  c8beedea0c = 116:  7400bc762b mingw: do load libcurl dynamically by default
117:  1c43aa2f80 = 117:  d6530a1026 Win32: make FILETIME conversion functions public
118:  daba14e352 = 118:  d2516e6c6f Win32: dirent.c: Move opendir down
119:  26ff212e5b = 119:  47599bc192 mingw: make the dirent implementation pluggable
120:  8a45073bd9 = 120:  363c7cb569 Win32: make the lstat implementation pluggable
121:  37448c0bd3 = 121:  7077efd0b2 add infrastructure for read-only file system level caches
122:  1bf9db1ab2 = 122:  046c50b0cb mingw: add a cache below mingw's lstat and dirent implementations
123:  445594b3f4 = 123:  91e79a0119 fscache: load directories only once
124:  09f704c910 = 124:  063de2693c fscache: add key for GIT_TRACE_FSCACHE
125:  638aa4dd7b = 125:  4f22e39d6b fscache: remember not-found directories
126:  0c799e8fa6 = 126:  4715d48e5b fscache: add a test for the dir-not-found optimization
127:  6b8a4731ef = 127:  6372dc890a add: use preload-index and fscache for performance
128:  6a6489bf50 = 128:  39b6ebac58 dir.c: make add_excludes aware of fscache during status
129:  7a2be4a694 = 129:  c7c8fb2e13 fscache: make fscache_enabled() public
130:  f0047ace03 = 130:  94657c8e46 dir.c: regression fix for add_excludes with fscache
131:  72f1796de8 = 131:  88f48a3e8b fetch-pack.c: enable fscache for stats under .git/objects
132:  9d8c44283a = 132:  d74314b99e checkout.c: enable fscache for checkout again
133:  e68a1964cc = 133:  39c3752943 Enable the filesystem cache (fscache) in refresh_index().
134:  56db40a453 = 134:  40675f9973 fscache: use FindFirstFileExW to avoid retrieving the short name
135:  ca67929700 = 135:  039eab9a48 status: disable and free fscache at the end of the status command
136:  feb0891c00 = 136:  488adea819 fscache: add GIT_TEST_FSCACHE support
137:  f88b63fcd2 = 137:  37429dafda fscache: add fscache hit statistics
138:  3f877b34cb = 138:  0136273134 mem_pool: add GIT_TRACE_MEMPOOL support
139:  4a927e122f = 139:  a9fb2964b5 fscache: fscache takes an initial size
140:  eb1cddbb53 = 140:  f9b5ea29f8 fscache: update fscache to be thread specific instead of global
141:  ad3b55a55c = 141:  a41b646f5c fscache: teach fscache to use mempool
142:  5089621435 = 142:  fa663c8256 fscache: make fscache_enable() thread safe
143:  3c48c4bffa = 143:  49e7a2d273 fscache: teach fscache to use NtQueryDirectoryFile
144:  b2b95aa266 = 144:  82e84467d8 unpack-trees: enable fscache for sparse-checkout
145:  1840da0881 = 145:  0b3d932e34 fscache: remember the reparse tag for each entry
146:  73988bf058 = 146:  34ee57ce56 fscache: implement an FSCache-aware is_mount_point()
147:  098e11a2b3 = 147:  9bb2d36199 clean: make use of FSCache
148:  abca8483ba = 148:  c1378c83c9 git-gui: provide question helper for retry fallback on Windows
149:  d713ec63b8 = 149:  bb4e3f44e2 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
152:  28a53eff30 = 150:  122cb43573 gitk: Unicode file name support
150:  e8829e13f2 = 151:  f7fe718e8a git-gui--askyesno: fix funny text wrapping
154:  cc145a64b4 = 152:  3fc9a513d1 gitk: Use an external icon file on Windows
153:  cc44581727 = 153:  cd568e87f3 git-gui--askyesno: allow overriding the window title
156:  f9da0a3e1e = 154:  86f611c692 gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
151:  f2c683f497 = 155:  c60a6f97d3 respect core.hooksPath, falling back to .git/hooks
155:  0a1402ca41 = 156:  77e6495c85 git-gui--askyesno (mingw): use Git for Windows' icon, if available
157:  e2883d6b4a = 157:  7a355b6e4d gitk: make the "list references" default window width wider
158:  7af2483631 = 158:  b368524169 pack-objects (mingw): demonstrate a segmentation fault with large deltas
159:  4b83342b54 = 159:  e28db144e8 mingw: support long paths
160:  03b19c5c80 = 160:  23cd1adff5 Win32: fix 'lstat("dir/")' with long paths
161:  99449a4283 = 161:  f0a80463f1 mingw: Support `git_terminal_prompt` with more terminals
162:  10bdb171c8 = 162:  eee72a716c compat/terminal.c: only use the Windows console if bash 'read -r' fails
163:  2c90056f29 = 163:  f28b98c9f1 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
165:  22eee9a574 = 164:  ebaa689733 compat/fsmonitor/fsm-*-win32: support long paths
166:  d0c9933de9 = 165:  3a9d1ba414 clean: suggest using `core.longPaths` if paths are too long to remove
164:  c4da7849db = 166:  1fc8dadc9b Unbreak interactive GPG prompt upon signing
167:  a71114c721 = 167:  bb13a5960e strbuf_readlink: don't call readlink twice if hint is the exact link size
168:  52c88db3a4 = 168:  1b8f49e448 strbuf_readlink: support link targets that exceed PATH_MAX
169:  9c5fe34020 = 169:  46b0ded534 lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
170:  a732ac9aa1 = 170:  37c2e28e17 Win32: don't call GetFileAttributes twice in mingw_lstat()
171:  b8b926a1f9 = 171:  1557155bd5 Win32: implement stat() with symlink support
172:  c242a2c015 = 172:  2ce2208a58 Win32: remove separate do_lstat() function
173:  e7b11cb84e = 173:  beebbdb157 Win32: let mingw_lstat() error early upon problems with reparse points
174:  f0f52c211f = 174:  3931a56ded mingw: teach fscache and dirent about symlinks
175:  130cac6e9e = 175:  334d3e072d Win32: lstat(): return adequate stat.st_size for symlinks
176:  abe3974227 = 176:  c0b3608e33 Win32: factor out retry logic
177:  dba7371ac8 = 177:  a08cfe59d4 Win32: change default of 'core.symlinks' to false
178:  08b3b53e08 = 178:  0e29aa7e66 Win32: add symlink-specific error codes
179:  5e67d3e859 = 179:  2294f8e2c3 Win32: mingw_unlink: support symlinks to directories
180:  8c7b9e4607 = 180:  a15cc3944d Win32: mingw_rename: support renaming symlinks
181:  9b6ad408da = 181:  5f105e5e50 Win32: mingw_chdir: change to symlink-resolved directory
182:  5410074ba5 = 182:  8d3c55602d Win32: implement readlink()
183:  57a747742d = 183:  d92a1f86e8 mingw: lstat: compute correct size for symlinks
184:  fbf85ba84b = 184:  9714d3fb8d Win32: implement basic symlink() functionality (file symlinks only)
185:  29365a9625 = 185:  ac543f4df7 Win32: symlink: add support for symlinks to directories
186:  e10e57755f = 186:  d5eca7b3c4 mingw: try to create symlinks without elevated permissions
187:  f95e65a783 = 187:  c3a8bfd8e2 mingw: emulate stat() a little more faithfully
188:  daf72c732f = 188:  e993ce4b62 mingw: special-case index entries for symlinks with buggy size
189:  b08171191e = 189:  f86ebb1fa7 mingw: introduce code to detect whether we're inside a Windows container
190:  e903be5b97 = 190:  5875222af6 mingw: when running in a Windows container, try to rename() harder
193:  6f6bbab358 = 191:  4eb6570fad mingw: move the file_attr_to_st_mode() function definition
195:  04e052db93 = 192:  d2194662d6 mingw: Windows Docker volumes are *not* symbolic links
191:  c4ac341de9 = 193:  f183dd1625 Win32: symlink: move phantom symlink creation to a separate function
192:  946cdd9a36 = 194:  9543a033ec Introduce helper to create symlinks that knows about index_state
194:  871817c12a = 195:  2650b4be2e mingw: allow to specify the symlink type in .gitattributes
196:  0240cd3813 = 196:  25e1dca0eb Win32: symlink: add test for `symlink` attribute
197:  6dcc2fc767 = 197:  03b505c7c5 mingw: explicitly specify with which cmd to prefix the cmdline
198:  8235698271 = 198:  addcf25123 mingw: when path_lookup() failed, try BusyBox
199:  e67d499c28 = 199:  1f91a8ac64 test-lib: avoid unnecessary Perl invocation
200:  3c4dd79378 = 200:  f15fd08932 test-tool: learn to act as a drop-in replacement for `iconv`
201:  6595d38f7f = 201:  74901bc25f tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
202:  0c8e74c05a = 202:  0ab33c37cf gitattributes: mark .png files as binary
203:  4acd3bc5e6 = 203:  5689f7a9f2 tests: move test PNGs into t/lib-diff/
204:  9bee9d3ccb = 204:  1bcdcf3878 tests: only override sort & find if there are usable ones in /usr/bin/
205:  367187c3ce = 205:  fac7d72ece tests: use the correct path separator with BusyBox
206:  be7e6b241e = 206:  d078d4246f mingw: only use Bash-ism `builtin pwd -W` when available
207:  d91f2b290e = 207:  d477630335 tests (mingw): remove Bash-specific pwd option
208:  65cfce033d = 208:  f5c02841eb test-lib: add BUSYBOX prerequisite
209:  f988f65c41 = 209:  c549b5a0c3 t5003: use binary file from t/lib-diff/
210:  d7ff2324fe = 210:  b1215e33ac t5532: workaround for BusyBox on Windows
211:  2ca9529a04 = 211:  3e934825a6 t5605: special-case hardlink test for BusyBox-w32
212:  31765ca7ae = 212:  249439c076 t5813: allow for $PWD to be a Windows path
213:  80156be6a0 = 213:  b3c6f244f7 t9200: skip tests when $PWD contains a colon
214:  52a1291d17 = 214:  859e1c1b1c mingw: kill child processes in a gentler way
215:  0de7f5e28c = 215:  cc746ec9ac mingw: add a Makefile target to copy test artifacts
216:  181e466f8c = 216:  06718424f7 mingw: do not call xutftowcs_path in mingw_mktemp
217:  e03b030034 = 217:  642bc32529 mingw: really handle SIGINT
218:  6dfcedf0f1 = 218:  1b21cbee43 Partially un-revert "editor: save and reset terminal after calling EDITOR"
219:  98073ac070 = 219:  eb41e9c4c5 reset: reinstate support for the deprecated --stdin option
225:  e890ff37e8 = 220:  ffd8e89445 fsmonitor: reintroduce core.useBuiltinFSMonitor
226:  11a01f19e4 = 221:  a93cd55848 Add a GitHub workflow to monitor component updates
220:  6914f366b4 = 222:  732da04fdc Describe Git for Windows' architecture [no ci]
221:  bdc5f96761 = 223:  d146e95b4d Modify the Code of Conduct for Git for Windows
222:  e3275ecf7b = 224:  39b509aab1 CONTRIBUTING.md: add guide for first-time contributors
223:  29a2c35bb8 = 225:  f4a6f7477a README.md: Add a Windows-specific preamble
224:  ae7a2c4dda = 226:  4f54c09caa Add an issue template
227:  74d39521cf = 227:  de06de2623 Modify the GitHub Pull Request template (to reflect Git for Windows)
228:  4f98083fb7 = 228:  024a796012 .github: Add configuration for the Sentiment Bot
229:  00e9d6ef19 = 229:  c878fc56ca Document how $HOME is set on Windows
230:  c869f98797 = 230:  bd9880a68b SECURITY.md: document Git for Windows' policies

dennisameling and others added 30 commits May 24, 2023 16:37
Git's regular Makefile mentions that HOST_CPU should be defined when cross-compiling Git: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/Makefile#L438-L439

This is then used to set the GIT_HOST_CPU variable when compiling Git: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/Makefile#L1337-L1341

Then, when the user runs `git version --build-options`, it returns that value: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/help.c#L658

This commit adds the same functionality to the CMake configuration. Users can now set -DHOST_CPU= to set the target architecture.

Signed-off-by: Dennis Ameling <[email protected]>
We now have a GitHub Action to download and cache Azure Pipelines
artifacts (such as the `vcpkg` artifacts), hiding gnarly internals, and
also providing some robustness against network glitches. Let's use it.

Signed-off-by: Johannes Schindelin <[email protected]>
As reported in newren/git-filter-repo#225, it
looks like 99 bytes is not really sufficient to represent e.g. the full
path to Python when installed via Windows Store (and this path is used
in the hasb bang line when installing scripts via `pip`).

Let's increase it to what is probably the maximum sensible path size:
MAX_PATH. This makes `parse_interpreter()` in line with what
`lookup_prog()` handles.

Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Vilius Šumskas <[email protected]>
We used to have that `make vcxproj` hack, but a hack it is. In the
meantime, we have a much cleaner solution: using CMake, either
explicitly, or even more conveniently via Visual Studio's built-in CMake
support (simply open Git's top-level directory via File>Open>Folder...).

Let's let the `README` reflect this.

Signed-off-by: Johannes Schindelin <[email protected]>
This adds support for a new http.sslAutoClientCert config value.

In cURL 7.77 or later the schannel backend does not automatically send
client certificates from the Windows Certificate Store anymore.

This config value is only used if http.sslBackend is set to "schannel",
and can be used to opt in to the old behavior and force cURL to send
client certificates.

This fixes git-for-windows#3292

Signed-off-by: Pascal Muller <[email protected]>
Because `git subtree` (unlike most other `contrib` modules) is included as
part of the standard release of Git for Windows, its stability should be
verified as consistently as it is for the rest of git. By including the
`git subtree` tests in the CI workflow, these tests are as much of a gate to
merging and indicator of stability as the standard test suite.

Signed-off-by: Victoria Dye <[email protected]>
Correct some wording and inform users regarding the Visual Studio
changes (from V16.6) to the default generator.

Subsequent commits ensure that Git for Windows can be directly
opened in modern Visual Studio without needing special configuration
of the CMakeLists settings.

It appeares that internally Visual Studio creates it's own version of the
.sln file (etc.) for extension tools that expect them.

The large number of references below document the shifting of Visual Studio
default and CMake setting options.

refs: https://docs.microsoft.com/en-us/search/?scope=C%2B%2B&view=msvc-150&terms=Ninja

1. https://docs.microsoft.com/en-us/cpp/linux/cmake-linux-configure?view=msvc-160
(note the linux bit)
 "In Visual Studio 2019 version 16.6 or later ***, Ninja is the default
generator for configurations targeting a remote system or WSL. For more
information, see this post on the C++ Team Blog
[https://devblogs.microsoft.com/cppblog/linux-development-with-visual-studio-first-class-support-for-gdbserver-improved-build-times-with-ninja-and-updates-to-the-connection-manager/].

For more information about these settings, see CMakeSettings.json reference
[https://docs.microsoft.com/en-us/cpp/build/cmakesettings-reference?view=msvc-160]."

2. https://docs.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160
"CMake supports two files that allow users to specify common configure,
build, and test options and share them with others: CMakePresets.json
and CMakeUserPresets.json."

" Both files are supported in Visual Studio 2019 version 16.10 or later.
***"
3. https://devblogs.microsoft.com/cppblog/linux-development-with-visual-studio-first-class-support-for-gdbserver-improved-build-times-with-ninja-and-updates-to-the-connection-manager/
" Ninja has been the default generator (underlying build system) for
CMake configurations targeting Windows for some time***, but in Visual
Studio 2019 version 16.6 Preview 3*** we added support for Ninja on Linux."

4. https://docs.microsoft.com/en-us/cpp/build/cmakesettings-reference?view=msvc-160
" `generator`: specifies CMake generator to use for this configuration.
May be one of:

    Visual Studio 2019 only:
        Visual Studio 16 2019
        Visual Studio 16 2019 Win64
        Visual Studio 16 2019 ARM

    Visual Studio 2017 and later:
        Visual Studio 15 2017
        Visual Studio 15 2017 Win64
        Visual Studio 15 2017 ARM
        Visual Studio 14 2015
        Visual Studio 14 2015 Win64
        Visual Studio 14 2015 ARM
        Unix Makefiles
        Ninja

Because Ninja is designed for fast build speeds instead of flexibility
and function, it is set as the default. However, some CMake projects may
be unable to correctly build using Ninja. If this occurs, you can
instruct CMake to generate Visual Studio projects instead.

To specify a Visual Studio generator in Visual Studio 2017, open the
settings editor from the main menu by choosing CMake | Change CMake
Settings. Delete "Ninja" and type "V". This activates IntelliSense,
which enables you to choose the generator you want."

"To specify a Visual Studio generator in Visual Studio 2019, right-click
on the CMakeLists.txt file in Solution Explorer and choose CMake
Settings for project > Show Advanced Settings > CMake Generator.

When the active configuration specifies a Visual Studio generator, by
default MSBuild.exe is invoked with` -m -v:minimal` arguments."

5. https://docs.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160#enable-cmakepresetsjson-integration-in-visual-studio-2019
"Enable CMakePresets.json integration in Visual Studio 2019

CMakePresets.json integration isn't enabled by default in Visual Studio
2019. You can enable it for all CMake projects in Tools > Options >
CMake > General: (tick a box)" ... see more.

6. https://docs.microsoft.com/en-us/cpp/build/cmakesettings-reference?view=msvc-140
(whichever v140 is..)
"CMake projects are supported in Visual Studio 2017 and later."

7. https://docs.microsoft.com/en-us/cpp/overview/what-s-new-for-cpp-2017?view=msvc-150
"Support added for the CMake Ninja generator."

8. https://docs.microsoft.com/en-us/cpp/overview/what-s-new-for-cpp-2017?view=msvc-150#cmake-support-via-open-folder
"CMake support via Open Folder
Visual Studio 2017 introduces support for using CMake projects without
converting to MSBuild project files (.vcxproj). For more information,
see CMake projects in Visual
Studio[https://docs.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-150].
Opening CMake projects with Open Folder automatically configures the
environment for C++ editing, building, and debugging." ... +more!

9. https://docs.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160#supported-cmake-and-cmakepresetsjson-versions
"Visual Studio reads and evaluates CMakePresets.json and
CMakeUserPresets.json itself and doesn't invoke CMake directly with the
--preset option. So, CMake version 3.20 or later isn't strictly required
when you're building with CMakePresets.json inside Visual Studio. We
recommend using CMake version 3.14 or later."

10. https://docs.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160#enable-cmakepresetsjson-integration-in-visual-studio-2019
"If you don't want to enable CMakePresets.json integration for all CMake
projects, you can enable CMakePresets.json integration for a single
CMake project by adding a CMakePresets.json file to the root of the open
folder. You must close and reopen the folder in Visual Studio to
activate the integration.

11. https://docs.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160#default-configure-presets
***(doesn't actually say which version..)
"Default Configure Presets
If no CMakePresets.json or CMakeUserPresets.json file exists, or if
CMakePresets.json or CMakeUserPresets.json is invalid, Visual Studio
will fall back*** on the following default Configure Presets:

Windows example
JSON
{
  "name": "windows-default",
  "displayName": "Windows x64 Debug",
  "description": "Sets Ninja generator, compilers, x64 architecture,
build and install directory, debug build type",
  "generator": "Ninja",
  "binaryDir": "${sourceDir}/out/build/${presetName}",
  "architecture": {
    "value": "x64",
    "strategy": "external"
  },
  "cacheVariables": {
    "CMAKE_BUILD_TYPE": "Debug",
    "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
  },
  "vendor": {
    "microsoft.com/VisualStudioSettings/CMake/1.0": {
      "hostOS": [ "Windows" ]
    }
  }
},
"

Signed-off-by: Philip Oakley <[email protected]>
On LLP64 systems, such as Windows, the size of `long`, `int`, etc. is
only 32 bits (for backward compatibility). Git's use of `unsigned long`
for file memory sizes in many places, rather than size_t, limits the
handling of large files on LLP64 systems (commonly given as `>4GB`).

Provide a minimum test for handling a >4GB file. The `hash-object`
command, with the  `--literally` and without `-w` option avoids
writing the object, either loose or packed. This avoids the code paths
hitting the `bigFileThreshold` config test code, the zlib code, and the
pack code.

Subsequent patches will walk the test's call chain, converting types to
`size_t` (which is larger in LLP64 data models) where appropriate.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
The CMakeSettings.json file is tool generated. Developers may track it
should they provide additional settings.

Signed-off-by: Philip Oakley <[email protected]>
The previous commit adds a test that demonstrates a problem in the
`hash-object --literally` command, manifesting in an unnecessary file
size limit on systems using the LLP64 data model (which includes
Windows).

Walking the affected code path is `cmd_hash_object()` >> `hash_fd()` >>
`hash_literally()` >> `hash_object_file_literally()`.

The function `hash_object_file_literally()` is the first with a file
length parameter (via a mem buffer). This commit changes the type of
that parameter to the LLP64 compatible `size_t` type.

There are no other uses of the function. The `strbuf` type is already
`size_t` compatible.

Note: The hash-object test does not yet pass. Subsequent commits will
continue to walk the call tree's lower level functions to identify
further fixes.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
In Git-for-Windows, work on using ARM64 has progressed. The
commit 2d94b77 (cmake: allow building for Windows/ARM64, 2020-12-04)
failed to notice that /compat/vcbuild/vcpkg_install.bat will default to
using the "x64-windows" architecture for the vcpkg installation if not set,
but CMake is not told of this default. Commit 635b6d9 (vcbuild: install
ARM64 dependencies when building ARM64 binaries, 2020-01-31) later updated
vcpkg_install.bat to accept an arch (%1) parameter, but retained the default.

This default is neccessary for the use case where the project directory is
opened directly in Visual Studio, which will find and build a CMakeLists.txt
file without any parameters, thus expecting use of the default setting.

Also Visual studio will generate internal .sln solution and .vcxproj project
files needed for some extension tools. Inform users of the additional
.sln/.vcxproj generation.

** How to test:
 rm -rf '.vs' # remove old visual studio settings
 rm -rf 'compat/vcbuild/vcpkg' # remove any vcpkg downloads
 rm -rf 'contrib/buildsystems/out' # remove builds & CMake artifacts
 with a fresh Visual Studio Community Edition, File>>Open>>(git *folder*)
   to load the project (which will take some time!).
 check for successful compilation.
The implicit .sln (etc.) are in the hidden .vs directory created by
Visual Studio.

Signed-off-by: Philip Oakley <[email protected]>
Continue walking the code path for the >4GB `hash-object --literally`
test. The `hash_object_file_literally()` function internally uses both
`hash_object_file()` and `write_object_file_prepare()`. Both function
signatures use `unsigned long` rather than `size_t` for the mem buffer
sizes. Use `size_t` instead, for LLP64 compatibility.

While at it, convert those function's object's header buffer length to
`size_t` for consistency. The value is already upcast to `uintmax_t` for
print format compatibility.

Note: The hash-object test still does not pass. A subsequent commit
continues to walk the call tree's lower level hash functions to identify
further fixes.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Ensure key CMake option values are part of the CMake output to
facilitate user support when tool updates impact the wider CMake
actions, particularly ongoing 'improvements' in Visual Studio.

These CMake displays perform the same function as the build-options.txt
provided in the main Git for Windows. CMake is already chatty.
The setting of CMAKE_EXPORT_COMPILE_COMMANDS is also reported.

Include the environment's CMAKE_EXPORT_COMPILE_COMMANDS value which
may have been propogated to CMake's internal value.

Testing the CMAKE_EXPORT_COMPILE_COMMANDS processing can be difficult
in the Visual Studio environment, as it may be cached in many places.
The 'environment' may include the OS, the user shell, CMake's
own environment, along with the Visual Studio presets and caches.

See previous commit for arefacts that need removing for a clean test.

Signed-off-by: Philip Oakley <[email protected]>
In Git for Windows, `has_symlinks` is set to 0 by default. Therefore, we
need to parse the config setting `core.symlinks` to know if it has been
set to `true`. In `git init`, we must do that before copying the
templates because they might contain symbolic links.

Even if the support for symbolic links on Windows has not made it to
upstream Git yet, we really should make sure that all the `core.*`
settings are parsed before proceeding, as they might very well change
the behavior of `git init` in a way the user intended.

This fixes git-for-windows#3414

Signed-off-by: Johannes Schindelin <[email protected]>
If `feature.experimental` and `feature.manyFiles` are set and the user
has not explicitly turned off the builtin FSMonitor, we now start
the built-in FSMonitor by default.

Only forcing it when UNSET matches the behavior of UPDATE_DEFAULT_BOOL()
used for other repo settings.

Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Jeff Hostetler <[email protected]>
Continue walking the code path for the >4GB `hash-object --literally`
test to the hash algorithm step for LLP64 systems.

This patch lets the SHA1DC code use `size_t`, making it compatible with
LLP64 data models (as used e.g. by Windows).

The interested reader of this patch will note that we adjust the
signature of the `git_SHA1DCUpdate()` function without updating _any_
call site. This certainly puzzled at least one reviewer already, so here
is an explanation:

This function is never called directly, but always via the macro
`platform_SHA1_Update`, which is usually called via the macro
`git_SHA1_Update`. However, we never call `git_SHA1_Update()` directly
in `struct git_hash_algo`. Instead, we call `git_hash_sha1_update()`,
which is defined thusly:

    static void git_hash_sha1_update(git_hash_ctx *ctx,
                                     const void *data, size_t len)
    {
        git_SHA1_Update(&ctx->sha1, data, len);
    }

i.e. it contains an implicit downcast from `size_t` to `unsigned long`
(before this here patch). With this patch, there is no downcast anymore.

With this patch, finally, the t1007-hash-object.sh "files over 4GB hash
literally" test case is fixed.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Just like the `hash-object --literally` code path, the `--stdin` code
path also needs to use `size_t` instead of `unsigned long` to represent
memory sizes, otherwise it would cause problems on platforms using the
LLP64 data model (such as Windows).

To limit the scope of the test case, the object is explicitly not
written to the object store, nor are any filters applied.

The `big` file from the previous test case is reused to save setup time;
To avoid relying on that side effect, it is generated if it does not
exist (e.g. when running via `sh t1007-*.sh --long --run=1,41`).

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
To complement the `--stdin` and `--literally` test cases that verify
that we can hash files larger than 4GB on 64-bit platforms using the
LLP64 data model, here is a test case that exercises `hash-object`
_without_ any options.

Just as before, we use the `big` file from the previous test case if it
exists to save on setup time, otherwise generate it.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
To verify that the `clean` side of the `clean`/`smudge` filter code is
correct with regards to LLP64 (read: to ensure that `size_t` is used
instead of `unsigned long`), here is a test case using a trivial filter,
specifically _not_ writing anything to the object store to limit the
scope of the test case.

As in previous commits, the `big` file from previous test cases is
reused if available, to save setup time, otherwise re-generated.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
In the case of Git for Windows (say, in a Git Bash window) running in a
Windows Subsystem for Linux (WSL) directory, the GetNamedSecurityInfoW()
call in is_path_owned_By_current_side() returns an error code other than
ERROR_SUCCESS. This is consistent behavior across this boundary.

In these cases, the owner would always be different because the WSL
owner is a different entity than the Windows user.

The change here is to suppress the error message that looks like this:

  error: failed to get owner for '//wsl.localhost/...' (1)

Before this change, this warning happens for every Git command,
regardless of whether the directory is marked with safe.directory.

Signed-off-by: Derrick Stolee <[email protected]>
For Windows builds >= 15063 set $env:TERM to "xterm-256color" instead of
"cygwin" because they have a more capable console system that supports
this. Also set $env:COLORTERM="truecolor" if unset.

$env:TERM is initialized so that ANSI colors in color.c work, see
29a3963 (Win32: patch Windows environment on startup, 2012-01-15).

See git-for-windows#3629 regarding problems caused by always setting
$env:TERM="cygwin".

This is the same heuristic used by the Cygwin runtime.

Signed-off-by: Rafael Kitover <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
NtQueryObject under Wine can return a success but fill out no name.
In those situations, Wine will set Buffer to NULL, and set result to
the sizeof(OBJECT_NAME_INFORMATION).

Running a command such as

echo "$(git.exe --version 2>/dev/null)"

will crash due to a NULL pointer dereference when the code attempts to
null terminate the buffer, although, weirdly, removing the subshell or
redirecting stdout to a file will not trigger the crash.

Code has been added to also check Buffer and Length to ensure the check
is as robust as possible due to the current behavior being fragile at
best, and could potentially change in the future

This code is based on the behavior of NtQueryObject under wine and
reactos.

Signed-off-by: Christopher Degawa <[email protected]>
Atomic append on windows is only supported on local disk files, and it may
cause errors in other situations, e.g. network file system. If that is the
case, this config option should be used to turn atomic append off.

Co-Authored-By: Johannes Schindelin <[email protected]>
Signed-off-by: 孙卓识 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
From the documentation of said setting:

	This boolean will enable fsync() when writing object files.

	This is a total waste of time and effort on a filesystem that
	orders data writes properly, but can be useful for filesystems
	that do not use journalling (traditional UNIX filesystems) or
	that only journal metadata and not file contents (OS X’s HFS+,
	or Linux ext3 with "data=writeback").

The most common file system on Windows (NTFS) does not guarantee that
order, therefore a sudden loss of power (or any other event causing an
unclean shutdown) would cause corrupt files (i.e. files filled with
NULs). Therefore we need to change the default.

Note that the documentation makes it sound as if this causes really bad
performance. In reality, writing loose objects is something that is done
only rarely, and only a handful of files at a time.

Signed-off-by: Johannes Schindelin <[email protected]>
This is another fall-out of the recent refactoring flurry.

Signed-off-by: Johannes Schindelin <[email protected]>
This fixes the build after 7bc341e (git-compat-util: add a test
balloon for C99 support, 2021-12-01).

Signed-off-by: Johannes Schindelin <[email protected]>
This is now passed by default, ever since 6a8cbc4 (developer: enable
pedantic by default, 2021-09-03).

Signed-off-by: Johannes Schindelin <[email protected]>
Since ef8a6c6 (reftable: utility functions, 2021-10-07) we not only
have a libreftable, but also a libreftable_test.

Signed-off-by: Johannes Schindelin <[email protected]>
shiftkey and others added 21 commits May 24, 2023 16:38
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and
Philip Oakley.

Helped-by: Clive Chan <[email protected]>
Helped-by: Adric Norris <[email protected]>
Helped-by: Ben Bodenmiller <[email protected]>
Helped-by: Philip Oakley <[email protected]>
Signed-off-by: Brendan Forster <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows accepts pull requests; Core Git does not. Therefore we
need to adjust the template (because it only matches core Git's
project management style, not ours).

Also: direct Git for Windows enhancements to their contributions page,
space out the text for easy reading, and clarify that the mailing list
is plain text, not HTML.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
The sentiment bot will help detect when things get too heated.
Hopefully.

Signed-off-by: Johannes Schindelin <[email protected]>
Git documentation refers to $HOME and $XDG_CONFIG_HOME often, but does not specify how or where these values come from on Windows where neither is set by default. The new documentation reflects the behavior of setup_windows_environment() in compat/mingw.c.

Signed-off-by: Alejandro Barreto <[email protected]>
This is the recommended way on GitHub to describe policies revolving around
security issues and about supported versions.

Signed-off-by: Johannes Schindelin <[email protected]>
These are Git for Windows' Git GUI and gitk patches. We will have to
decide at some point what to do about them, but that's a little lower
priority (as Git GUI seems to be unmaintained for the time being, and
the gitk maintainer keeps a very low profile on the Git mailing list,
too).

Signed-off-by: Johannes Schindelin <[email protected]>
…dvice

clean: suggest using `core.longPaths` if paths are too long to remove
This was pull request git-for-windows#1645 from ZCube/master

Support windows container.

Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Handle Ctrl+C in Git Bash nicely

Signed-off-by: Johannes Schindelin <[email protected]>
A fix for calling `vim` in Windows Terminal caused a regression and was
reverted. We partially un-revert this, to get the fix again.

Signed-off-by: Johannes Schindelin <[email protected]>
This topic branch re-adds the deprecated --stdin/-z options to `git
reset`. Those patches were overridden by a different set of options in
the upstream Git project before we could propose `--stdin`.

We offered this in MinGit to applications that wanted a safer way to
pass lots of pathspecs to Git, and these applications will need to be
adjusted.

Instead of `--stdin`, `--pathspec-from-file=-` should be used, and
instead of `-z`, `--pathspec-file-nul`.

Signed-off-by: Johannes Schindelin <[email protected]>
Originally introduced as `core.useBuiltinFSMonitor` in Git for Windows
and developed, improved and stabilized there, the built-in FSMonitor
only made it into upstream Git (after unnecessarily long hemming and
hawing and throwing overly perfectionist style review sticks into the
spokes) as `core.fsmonitor = true`.

In Git for Windows, with this topic branch, we re-introduce the
now-obsolete config setting, with warnings suggesting to existing users
how to switch to the new config setting, with the intention to
ultimately drop the patch at some stage.

Signed-off-by: Johannes Schindelin <[email protected]>
…updates

Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <[email protected]>
@mjcheetham mjcheetham requested review from dscho and vdye May 24, 2023 22:44
@mjcheetham mjcheetham added this to the Next release milestone May 24, 2023
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The range-diff looks good, as well as the (empty) diff to shears/main!

@mjcheetham
Copy link
Member Author

mjcheetham commented May 24, 2023

/git-artifacts

The tag-git workflow run was started

@mjcheetham
Copy link
Member Author

mjcheetham commented May 25, 2023

/release

The release-git workflow run was started

@mjcheetham mjcheetham merged commit 90ec798 into git-for-windows:main May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.