Skip to content

Rebase shears/next: 2 conflict(s) (1 skipped, 1 resolved) (#24700386458)#141

Open
gitforwindowshelper[bot] wants to merge 288 commits intobase/shears/next-24700386458from
shears/next-24700386458
Open

Rebase shears/next: 2 conflict(s) (1 skipped, 1 resolved) (#24700386458)#141
gitforwindowshelper[bot] wants to merge 288 commits intobase/shears/next-24700386458from
shears/next-24700386458

Conversation

@gitforwindowshelper
Copy link
Copy Markdown

Workflow run

Rebase Summary: next

From: 45ba1c73b0 (Merge 'readme' into HEAD, 2018-06-07) (bd7ba38354..45ba1c73b0)

Resolved: 84bfde6 (t5563: verify that NTLM authentication works, 2025-11-26)

kept both upstream SPNEGO tests and downstream NTLM test appended before test_done

Range-diff
  • 1: 84bfde6 ! 1: f7892c4 t5563: verify that NTLM authentication works

    @@ t/lib-httpd/ntlm-handshake.sh (new)
     +esac
     
      ## t/t5563-simple-http-auth.sh ##
    -@@ t/t5563-simple-http-auth.sh: test_expect_success 'access using three-legged auth' '
    - 	EOF
    +@@ t/t5563-simple-http-auth.sh: test_expect_success SPNEGO 'http.emptyAuth=false skips Negotiate' '
    + 	test_line_count = 1 actual_401s
      '
      
     +test_lazy_prereq NTLM 'curl --version | grep -q NTLM'

Skipped: 5361ead (http: extract http_reauth_prepare() from retry paths, 2026-04-13)

Upstream equivalent: a8faa7a (http: extract http_reauth_prepare() from retry paths, 2026-04-16)

Range-diff
  • 1: 5361ead ! 1: a8faa7a http: extract http_reauth_prepare() from retry paths

    @@ Commit message
         No functional change.
     
         Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
    +    Signed-off-by: Junio C Hamano <gitster@pobox.com>
     
      ## http.c ##
     @@ http.c: static void init_curl_http_auth(CURL *result)
    @@ http.c: static int http_request_recoverable(const char *url,
     +			http_reauth_prepare(1);
      		}
      
    - 		/*
    + 		ret = http_request(url, result, target, options);
     
      ## http.h ##
     @@ http.h: extern int http_is_verbose;

To: 5b50e258f2 (Merge 'readme' into HEAD, 2018-06-07) (efb6a439e7..5b50e258f2)

Statistics

Metric Count
Total conflicts 2
Skipped (upstreamed) 1
Resolved surgically 1
Range-diff (click to expand)
  • 1: 3fa44f4 = 1: 72ad0aa ci(dockerized): reduce the PID limit for private repositories

  • 2: 5e0b4a0 = 2: 5036727 mingw: skip symlink type auto-detection for network share targets

  • 3: 412a11d = 3: c3a1dcc Merge branch 'fix-ci'

  • 4: 41fd56e = 4: 7f2f635 unix-socket: avoid leak when initialization fails

  • 5: 87fb0a5 = 5: 75ee5c3 Merge branch 'prevent-accidental-ntlm-exfiltration-via-symlinks'

  • 6: e346542 = 6: 4e4f6b4 grep: prevent ^$ false match at end of file

  • 7: 0a36c77 = 7: e97284f Merge branch 'v2.53.0.windows.3'

  • 8: 7717eae = 8: 1c2cf72 Merge branch 'fixes-from-the-git-mailing-list'

  • 9: c94113e = 9: bf60ec9 vcpkg_install: detect lack of Git

  • 10: 6170c7d = 10: 6df05f6 vcpkg_install: add comment regarding slow network connections

  • 11: 128dd23 = 11: e78dbf1 vcbuild: install ARM64 dependencies when building ARM64 binaries

  • 12: 14747fd = 12: aa622d4 vcbuild: add an option to install individual 'features'

  • 13: 2b7c963 = 13: 89d78e8 cmake: allow building for Windows/ARM64

  • 14: be0fc1e = 14: f30a666 mingw: include the Python parts in the build

  • 15: dab81c1 = 15: 2313355 ci(vs-build) also build Windows/ARM64 artifacts

  • 16: b292609 = 16: 207592c win32/pthread: avoid name clashes with winpthread

  • 17: 93f221b = 17: e615a69 Add schannel to curl installation

  • 18: 68d683d = 18: 18efbdd git-compat-util: avoid redeclaring _DEFAULT_SOURCE

  • 19: a7e162c = 19: a51602b cmake(): allow setting HOST_CPU for cross-compilation

  • 20: 8ff8294 = 20: 3535697 Import the source code of mimalloc v2.2.7

  • 21: 53ee752 = 21: 53551af t9350: point out that refs are not updated correctly

  • 22: 11abc79 = 22: e23b795 CMake: default Visual Studio generator has changed

  • 23: 1f3e94c = 23: 73aa362 mimalloc: adjust for building inside Git

  • 24: 93ac47e = 24: c654b2f transport-helper: add trailing --

  • 25: 9c6d2f3 = 25: 2ad8f96 mingw: demonstrate a git add issue with NTFS junctions

  • 26: 9f4b715 = 26: 1cbbf62 .gitignore: add Visual Studio CMakeSetting.json file

  • 27: 2adcb57 = 27: d2e9da7 mimalloc: offer a build-time option to enable it

  • 28: 319c38c = 28: 0c46c15 t5505/t5516: allow running without .git/branches/ in the templates

  • 29: 19012c3 = 29: 9ceb02a remote-helper: check helper status after import/export

  • 30: bcf802e = 30: 9775df4 clean: do not traverse mount points

  • 31: c1e8789 = 31: 746c88a strbuf_realpath(): use platform-dependent API if available

  • 32: a617718 = 32: bdaa69b http: use new "best effort" strategy for Secure Channel revoke checking

  • 33: 55fc22f = 33: 87a423f subtree: update contrib/subtree test target

  • 34: 25a600d = 34: 5a227ed CMakeLists: add default "x64-windows" arch for Visual Studio

  • 35: 1e85180 = 35: 76d625a mingw: use mimalloc

  • 36: 0d1e66c = 36: 077f57d t5505/t5516: fix white-space around redirectors

  • 38: 1540159 = 37: dbfd528 Always auto-gc after calling a fast-import transport

  • 39: 06040b9 = 38: acd71b4 mingw: prevent regressions with "drive-less" absolute paths

  • 40: 47ca1da = 39: 031137f clean: remove mount points when possible

  • 41: 32e852a = 40: 5f40a22 transport: optionally disable side-band-64k

  • 42: daeb014 = 41: 612f4c4 mingw: fix fatal error working on mapped network drives on Windows

  • 43: 6c6401d = 42: e2cdd85 clink.pl: fix MSVC compile script to handle libcurl-d.lib

  • 44: a212e7a = 43: 3e8d872 mingw: implement a platform-specific strbuf_realpath()

  • 45: f14df81 = 44: 2f324a1 t3701: verify that we can add lots of files interactively

  • 46: 0a31493 = 45: b012021 commit: accept "scissors" with CR/LF line endings

  • 47: 3c324d1 = 46: 9d8ff00 t0014: fix indentation

  • 48: 55a7fdd = 47: ee00b9b git-gui: accommodate for intent-to-add files

  • 49: ef498a3 = 48: 9add57b mingw: allow for longer paths in parse_interpreter()

  • 50: 281b6d5 = 49: 735ac4c compat/vcbuild: document preferred way to build in Visual Studio

  • 51: 2b0446f = 50: 763274a http: optionally send SSL client certificate

  • 52: 26ef0e4 = 51: eaa4e1c ci: run contrib/subtree tests in CI builds

  • 53: 23fc4df = 52: b9d700f CMake: show Win32 and Generator_platform build-option values

  • 54: e05535e = 53: 869a3b6 windows: skip linking git-<command> for built-ins

  • 55: 96f99e1 = 54: ff08fbf mingw: stop hard-coding CC = gcc

  • 56: a10375b = 55: 1cf6ec2 mingw: drop the -D_USE_32BIT_TIME_T option

  • 57: 7293fbd = 56: 69c8bab mingw: only use -Wl,--large-address-aware for 32-bit builds

  • 58: 1fba022 = 57: 112e054 mingw: avoid over-specifying --pic-executable

  • 59: 1b8d1b9 = 58: da35fa8 mingw: set the prefix and HOST_CPU as per MSYS2's settings

  • 60: 88c6741 = 59: 82fa326 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2

  • 61: 60de161 = 60: 1779bc0 mingw: rely on MSYS2's metadata instead of hard-coding it

  • 62: fa07ed9 = 61: e1c2da8 mingw: always define ETC_* for MSYS2 environments

  • 63: 2cd1b40 = 62: 8680d2f max_tree_depth: lower it for clang builds in general on Windows

  • 64: fe3907e = 63: f63538b mingw: ensure valid CTYPE

  • 66: 1c65e39 = 64: bd6508c mingw: allow git.exe to be used instead of the "Git wrapper"

  • 68: af63d4b = 65: 35b53e4 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory

  • 70: af2b690 = 66: 41ae57c Merge branch 'dscho-avoid-d-f-conflict-in-vs-master'

  • 72: a1b2250 = 67: 20b4607 clink.pl: fix libexpatd.lib link error when using MSVC

  • 74: d911a52 = 68: 1b29e89 Makefile: clean up .ilk files when MSVC=1

  • 37: fecf276 = 69: 96ce103 hash-object: demonstrate a >4GB/LLP64 problem

  • 76: 238d69d = 70: 41fba32 vcbuild: add support for compiling Windows resource files

  • 65: 4f078f5 = 71: 95d30d2 ci: work around a problem with HTTP/2 vs libcurl v8.10.0

  • 78: c8da627 = 72: b1e2670 object-file.c: use size_t for header lengths

  • 79: 9f19bb9 = 73: 2021403 config.mak.uname: add git.rc to MSVC builds

  • 80: 165f453 = 74: 3a2b30a MinGW: link as terminal server aware

  • 67: 9367a07 = 75: 13e4ed4 revision: create mark_trees_uninteresting_dense()

  • 83: adc246d = 76: 9075f16 hash algorithms: use size_t for section lengths

  • 84: 936ded0 = 77: 8515fbe clink.pl: ignore no-stack-protector arg on MSVC=1 builds

  • 85: 55b6125 = 78: c857e09 http: optionally load libcurl lazily

  • 69: 57ff8aa = 79: d9edf20 survey: stub in new experimental 'git-survey' command

  • 88: 817b09b = 80: edbe263 hash-object --stdin: verify that it works with >4GB/LLP64

  • 89: e6eb327 = 81: c46f3b0 clink.pl: move default linker options for MSVC=1 builds

  • 90: 3ed0530 = 82: e6cbb4f http: support lazy-loading libcurl also on Windows

  • 71: 859ae96 = 83: 919cf5a survey: add command line opts to select references

  • 93: 58e39d2 = 84: 94f0ab4 hash-object: add another >4GB/LLP64 test case

  • 94: d481015 = 85: c0a2937 setup: properly use "%(prefix)/" when in WSL

  • 95: 4bc27d8 = 86: 1f682ed Add config option windows.appendAtomically

  • 96: b3005d3 = 87: 58d360b cmake: install headless-git.

  • 97: 0eb776f = 88: 9c1c186 http: when loading libcurl lazily, allow for multiple SSL backends

  • 73: 57435c6 = 89: de54cca survey: start pretty printing data in table form

  • 100: e692e74 = 90: 4cbebf8 hash-object: add a >4GB/LLP64 test case using filtered input

  • 101: 87278cb = 91: 982a6b7 compat/mingw.c: do not warn when failing to get owner

  • 102: 77e6136 = 92: 0385be5 mingw: $env:TERM="xterm-256color" for newer OSes

  • 103: 38b8878 = 93: 1a2f711 winansi: check result and Buffer before using Name

  • 104: e8271dd = 94: fec058e mingw: change core.fsyncObjectFiles = 1 by default

  • 105: 295a264 = 95: 94e22e1 Fix Windows version resources

  • 106: 935db82 = 96: 4272ea7 status: fix for old-style submodules with commondir

  • 107: 518258b = 97: 4564bb7 git.rc: include winuser.h

  • 108: 07dff4e = 98: a38164d mingw: do load libcurl dynamically by default

  • 109: 8e53de6 = 99: fd0c62c Add a GitHub workflow to verify that Git/Scalar work in Nano Server

  • 110: 1c3d015 = 100: 81ad40f mingw: suggest windows.appendAtomically in more cases

  • 111: 6ce8b31 = 101: 27b6260 win32: use native ANSI sequence processing, if possible

  • 112: 45328f4 = 102: fe3749d common-main.c: fflush stdout buffer upon exit

  • 113: f0da1f5 = 103: 78a814f t5601/t7406(mingw): do run tests with symlink support

  • 114: c99e0ec = 104: 1c91d23 win32: ensure that localtime_r() is declared even in i686 builds

  • 115: f1f14e1 = 105: 766d42e Fallback to AppData if XDG_CONFIG_HOME is unset

  • 116: 3a1526b = 106: 12e9f30 run-command: be helpful with Git LFS fails on Windows 7

  • 75: 71ad2fd = 107: 644515f survey: add object count summary

  • 77: 98ff7ea = 108: aed9a7d survey: summarize total sizes by object type

  • 81: a6a96d2 = 109: 186e4ed survey: show progress during object walk

  • 82: d7e9453 = 110: 45c585b mingw: make sure errno is set correctly when socket operations fail

  • 86: d09d016 = 111: 72f5caf survey: add ability to track prioritized lists

  • 87: a012534 = 112: f04a385 compat/mingw: handle WSA errors in strerror

  • 91: 3add00b = 113: 585e7b4 survey: add report of "largest" paths

  • 92: aa220ac = 114: ea1c7b3 compat/mingw: drop outdated comment

  • 98: a43ba95 = 115: 20207d5 survey: add --top= option and config

  • 99: e709885 = 116: 99eecf7 t0301: actually test credential-cache on Windows

  • 117: 55bb46a = 117: 5afdcd0 survey: clearly note the experimental nature in the output

  • 118: a0895ab = 118: 797ea5c credential-cache: handle ECONNREFUSED gracefully

  • 119: b5cd820 = 119: 3cc475c reftable: do make sure to use custom allocators

  • 162: 940e9e3 = 120: b2d43a5 check-whitespace: avoid alerts about upstream commits

  • 163: 0df1fb9 = 121: f0d63e2 t/t5571-prep-push-hook.sh: Add test with writing to stderr

  • 150: 84bfde6 ! 122: f7892c4 t5563: verify that NTLM authentication works

    @@ t/lib-httpd/ntlm-handshake.sh (new)
     +esac
     
      ## t/t5563-simple-http-auth.sh ##
    -@@ t/t5563-simple-http-auth.sh: test_expect_success 'access using three-legged auth' '
    - 	EOF
    +@@ t/t5563-simple-http-auth.sh: test_expect_success SPNEGO 'http.emptyAuth=false skips Negotiate' '
    + 	test_line_count = 1 actual_401s
      '
      
     +test_lazy_prereq NTLM 'curl --version | grep -q NTLM'
  • 152: d59f2f3 = 123: 0f361b6 http: disallow NTLM authentication by default

  • 154: a9211a4 ! 124: fde1c94 http: warn if might have failed because of NTLM

    @@ http.c: static int handle_curl_result(struct slot_results *results)
     +			}
      			return HTTP_NOAUTH;
      		} else {
    - 			http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE;
    + 			if (curl_empty_auth == -1 &&
     
      ## t/t5563-simple-http-auth.sh ##
     @@ t/t5563-simple-http-auth.sh: test_expect_success NTLM 'access using NTLM auth' '
  • 156: eab398d ! 125: f0eb818 credential: advertise NTLM suppression and allow helpers to re-enable

    @@ http.c: static int handle_curl_result(struct slot_results *results)
      					  "NTLM authentication has been

"
"disabled in Git by default. You can "
@@ http.c: static int http_request_recoverable(const char *url,

  •    	credential_fill(the_repository, &http_auth, 1);
    
  •    	http_reauth_prepare(1);
       }
    
+		/*

* 164:  9622ec89f0 = 126:  7770c63d45 dir: do not traverse mount points
* 165:  fc9de67d6e = 127:  8094e9cc67 win32: thread-utils: handle multi-socket systems
* 120:  74bdf955b6 = 128:  c9685fafaf Merge 'remote-hg-prerequisites' into HEAD
* 121:  c81743c613 = 129:  c69a09921b Merge branch 'drive-prefix'
* 122:  3877a32ae8 = 130:  1bf7625417 Merge branch 'dont-clean-junctions'
* 123:  e08c2442e1 = 131:  7eb2b1793e Merge branch 'msys2-python'
* 124:  f59f611537 = 132:  4846d73797 Update mimalloc to v2.2.7 (#6048)
* 125:  890e2628bf = 133:  012ebfac64 Merge pull request #2375 from assarbad/reintroduce-sideband-config
* 126:  09b37c04ec = 134:  f8fc6d2253 Merge pull request #2488 from bmueller84/master
* 127:  0b0e66469c = 135:  5b055bbd91 Merge pull request #2501 from jeffhostetler/clink-debug-curl
* 128:  484fe68c89 = 136:  ca967c4689 Merge pull request #2504 from dscho/access-repo-via-junction
* 129:  ae54decade = 137:  d75d304723 Merge pull request #2535 from dscho/schannel-revoke-best-effort
* 130:  706992fe73 = 138:  a2a6e548fd Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
* 131:  321afb6a5c = 139:  3ff6f3e7e7 Merge 'add-p-many-files'
* 132:  3154899e74 = 140:  6cc72dbe85 Merge pull request #2714 from lbonanomi/crlf-scissors
* 133:  12bd752602 = 141:  e422722a60 Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
* 134:  03d5af79c8 = 142:  bfb6b796d6 Merge 'git-gui/js/intent-to-add'
* 135:  addd10cce2 = 143:  efed0e4eeb Merge pull request #2351 from PhilipOakley/vcpkg-tip
* 136:  2d23171721 = 144:  abf711c1e2 Merge pull request #2915 from dennisameling/windows-arm64-support
* 137:  2c90249afb = 145:  6c82e545f6 Merge pull request #3327 from dennisameling/fix-host-cpu
* 138:  4a1052e291 = 146:  de0e705c33 Merge pull request #3165 from dscho/increase-allowed-length-of-interpreter-path
* 139:  d32510c082 = 147:  087ad5bf3e Merge pull request #3220 from dscho/there-is-no-vs/master-anymore
* 140:  b0dc035db8 = 148:  f332fd11f4 Merge pull request #3293 from pascalmuller/http-support-automatically-sending-client-certificate
* 141:  ebd3961086 = 149:  4b1e3dfd5a Merge pull request #3349 from vdye/feature/ci-subtree-tests
* 142:  18a382d666 = 150:  1d730db0bb Merge pull request #3306 from PhilipOakley/vs-sln
* 143:  78b7be9be4 = 151:  2cfdd34c7a Merge pull request #3533 from PhilipOakley/hashliteral_t
* 144:  78015e5088 = 152:  05bc86f3c8 Merge pull request #3791: Various fixes around `safe.directory`
* 145:  ca4c2174c7 = 153:  35a8cd093b Merge pull request #3751 from rkitover/native-term
* 146:  1e6bebea60 = 154:  0129316db4 Merge pull request #3875 from 1480c1/wine/detect_msys_tty
* 147:  52e88022ff = 155:  152471f612 Merge branch 'optionally-dont-append-atomically-on-windows'
* 148:  05ef678f6c = 156:  051b6a2ed9 Merge branch 'fsync-object-files-always'
* 149:  b613ef7805 = 157:  c62d0ca3ad Merge pull request #3942 from rimrul/mingw-tsaware
* 151:  2f31acae5e = 158:  5b412d14b9 Fix Windows version resources (#4092)
* 153:  cdd4052364 = 159:  3bf4086225 Fix global repository field not being cleared (#4083)
* 155:  59f80be3b0 = 160:  d70e289cfd Skip linking the "dashed" `git-<command>`s for built-ins (#4252)
* 166:  de8c0498b6 = 161:  5b41eff66f t5563: add tests for http.emptyAuth with Negotiate
* 157:  3bb953cbf3 = 162:  6ebd5d0e2b Add full `mingw-w64-git` (i.e. regular MSYS2 ecosystem) support (#5971)
* 158:  5361eadedd <   -:  ---------- http: extract http_reauth_prepare() from retry paths
* 159:  c502418830 = 163:  1349f1fc58 Merge pull request #2506 from dscho/issue-2283
* 160:  b6b72be959 <   -:  ---------- http: attempt Negotiate auth in http.emptyAuth=auto mode
* 161:  e1ff76337e = 164:  3ca3ac0e16 Merge pull request #2974 from derrickstolee/maintenance-and-headless
* 167:  7d3dc0d991 = 165:  cdf993ff64 ARM64: Embed manifest properly (#4718)
* 168:  9df23886b4 = 166:  bf4245b220 Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl (#4410)
* 169:  b0770c7c7c = 167:  f81b84f55f Merge branch 'nano-server'
* 170:  da404494a8 = 168:  91722f54d5 Additional error checks for issuing the windows.appendAtomically warning (#4528)
* 171:  0290fa5dd5 = 169:  4e98d67359 win32: use native ANSI sequence processing, if possible (#4700)
* 172:  3377baacf3 = 170:  57f8c569eb common-main.c: fflush stdout buffer when exit (#4901)
* 173:  58e204a967 = 171:  906e53a251 Merge branch 'run-t5601-and-t7406-with-symlinks-on-windows-10'
* 174:  9b9a9d3090 = 172:  6ea0928ca9 Merge branch 'Fix-i686-build-with-GCC-v14'
* 175:  5f2f0d76fc = 173:  7e120f5639 Merge branch 'Fallback-to-AppData-if-XDG-CONFIG-HOME-is-unset'
* 176:  cadba3b15d = 174:  1280c346db Merge branch 'run-command-be-helpful-when-Git-LFS-fails-on-Windows-7'
* 177:  1d5e5a7de8 = 175:  c7df96496d pack-objects: create new name-hash algorithm (#5157)
* 178:  f1646109f1 = 176:  fceb3afb40 Add path walk API and its use in 'git pack-objects' (#5171)
* 179:  86e8ce4d85 = 177:  3559429756 Add experimental 'git survey' builtin (#5174)
* 180:  69e2af77d7 = 178:  63a627a5ba credential-cache: handle ECONNREFUSED gracefully (#5329)
* 181:  98223fc593 = 179:  bdf2862db0 Merge branch 'reftable-vs-custom-allocators'
* 182:  a8e2b63604 = 180:  de360835ae Merge branch 'check-whitespace-only-downstream'
* 183:  92b03f1af3 = 181:  81bf6c9eb1 t/t5571-prep-push-hook.sh: Add test with writing to stderr (#6063)
* 184:  8b48b5f830 = 182:  df7cc073dd Merge branch 'disallow-ntlm-auth-by-default'
* 185:  16fa3474db = 183:  72cf506aa8 Don't traverse mount points in `remove_dir_recurse()` (#6151)
* 186:  6f01302e92 = 184:  a3c5cfc3bc Detect number of cores better on multi-socket systems (#6108)
* 187:  224c02cc28 = 185:  0ce0f10951 http: fix emptyAuth=auto for Negotiate/SPNEGO (#6170)
* 188:  71aa9fcdc3 = 186:  5ae9fcd3e8 Merge branch 'ready-for-upstream'
* 189:  7e887aa495 = 187:  8998cce6f3 ci(macos): skip the `git p4` tests
* 190:  0ec64dd02f = 188:  b26563d3f9 ci(macos): skip the `git p4` tests (#5954)
* 191:  3dc219a835 = 189:  b57b522b1a Win32: make FILETIME conversion functions public
* 192:  7a33374012 = 190:  bf3f816001 Win32: dirent.c: Move opendir down
* 193:  f334fde934 = 191:  44dab838ff mingw: make the dirent implementation pluggable
* 194:  e40d66c4b9 = 192:  ef2fda29ea Win32: make the lstat implementation pluggable
* 205:  4b49f783dc = 193:  d6de821188 git-gui--askyesno: fix funny text wrapping
* 195:  2989596ae3 = 194:  a4d67055ce mingw: add infrastructure for read-only file system level caches
* 207:  ee564f9ffd = 195:  9bcf7fd49a git-gui--askyesno (mingw): use Git for Windows' icon, if available
* 196:  a74ba80fe7 = 196:  014bcddd91 mingw: add a cache below mingw's lstat and dirent implementations
* 209:  dd19cba815 = 197:  7bbaa2c6c8 Merge branch 'git-gui-askyesno'
* 197:  fac57d53fe = 198:  4921c01cd3 fscache: load directories only once
* 198:  87b7346f50 = 199:  75f0d09427 fscache: add key for GIT_TRACE_FSCACHE
* 199:  ae8f3a47c7 = 200:  7b8ff3ecdf fscache: remember not-found directories
* 200:  5934f34ad2 = 201:  96bd3b5732 fscache: add a test for the dir-not-found optimization
* 201:  68338c98d6 = 202:  648ba7c615 add: use preload-index and fscache for performance
* 202:  d2af9bdb74 = 203:  360317c747 dir.c: make add_excludes aware of fscache during status
* 203:  3c6b05c897 = 204:  2b04b1178d fscache: make fscache_enabled() public
* 204:  9693b67476 = 205:  4a990c3feb dir.c: regression fix for add_excludes with fscache
* 206:  9a370bcf33 = 206:  d7dd991226 fetch-pack.c: enable fscache for stats under .git/objects
* 208:  9e17788073 = 207:  168ed40e52 checkout.c: enable fscache for checkout again
* 210:  711628e2f6 = 208:  70b4aeb340 Enable the filesystem cache (fscache) in refresh_index().
* 211:  728fcfbd09 = 209:  075179797e fscache: use FindFirstFileExW to avoid retrieving the short name
* 212:  fe2402e101 = 210:  7aa4148aeb fscache: add GIT_TEST_FSCACHE support
* 213:  1888682435 = 211:  af7424be29 fscache: add fscache hit statistics
* 214:  531ddedcc2 = 212:  c826ac3384 unpack-trees: enable fscache for sparse-checkout
* 215:  75d1a50e79 = 213:  cd1a868238 status: disable and free fscache at the end of the status command
* 216:  395df51ebb = 214:  cdcd09633e mem_pool: add GIT_TRACE_MEMPOOL support
* 217:  1e3dbbaea1 = 215:  4bb7e641ea fscache: fscache takes an initial size
* 218:  fe35222d82 = 216:  c7ff5ddc88 fscache: update fscache to be thread specific instead of global
* 219:  78cd44257a = 217:  ae5f5a41a3 fscache: teach fscache to use mempool
* 220:  b9690e2ca3 = 218:  41b32b25c3 fscache: make fscache_enable() thread safe
* 221:  7d877dfb63 = 219:  63edab8686 fscache: teach fscache to use NtQueryDirectoryFile
* 222:  6dd0cfe4f5 = 220:  62c5be3df9 fscache: remember the reparse tag for each entry
* 223:  83c0059ef9 = 221:  33d25933bb Merge branch 'fscache'
* 224:  596eadba4d = 222:  88cec63c93 fscache: implement an FSCache-aware is_mount_point()
* 225:  59a4796309 = 223:  16ac1668e0 Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
* 226:  c2266e8bc2 = 224:  c1073fb789 clean: make use of FSCache
* 227:  5cba9953a5 = 225:  a27767490f Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
* 228:  26f29fa2f3 = 226:  c8a4fa7dc2 Merge branch 'dont-clean-junctions-fscache'
* 229:  03dc8c1e41 = 227:  2eded25bfc pack-objects (mingw): demonstrate a segmentation fault with large deltas
* 230:  e2333d5d65 = 228:  1c036d5c74 mingw: support long paths
* 231:  e659aff0c2 = 229:  557417ae3d win32(long path support): leave drive-less absolute paths intact
* 232:  eecba3f1d5 = 230:  4aa668eca5 compat/fsmonitor/fsm-*-win32: support long paths
* 233:  2b0fcccd61 = 231:  cd1d9e35aa clean: suggest using `core.longPaths` if paths are too long to remove
* 234:  9c0ee00955 = 232:  a86779dcf9 mingw: Support `git_terminal_prompt` with more terminals
* 235:  fbc18ed86d = 233:  c85cb0249f compat/terminal.c: only use the Windows console if bash 'read -r' fails
* 236:  553ec1c1f9 = 234:  46182c253d mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
* 237:  40dab01f20 = 235:  3f692fd929 Win32: symlink: move phantom symlink creation to a separate function
* 238:  4ca814a43c = 236:  f8d77c3ee8 Introduce helper to create symlinks that knows about index_state
* 239:  7344509ef5 = 237:  03a9c17737 mingw: allow to specify the symlink type in .gitattributes
* 240:  6fd434acb7 = 238:  d30a52b36d Win32: symlink: add test for `symlink` attribute
* 241:  e2891d7446 = 239:  3f88e0e156 mingw: explicitly specify with which cmd to prefix the cmdline
* 242:  2a87cfd74e = 240:  ad37fd1cc3 mingw: when path_lookup() failed, try BusyBox
* 243:  f91165b8dd = 241:  cf909086f8 test-tool: learn to act as a drop-in replacement for `iconv`
* 244:  68d029f968 = 242:  3abc2f30ab tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
* 245:  43a59d31c9 = 243:  28e4408ba5 gitattributes: mark .png files as binary
* 246:  bd5b71f36c = 244:  3f7ffe1a6a tests: move test PNGs into t/lib-diff/
* 247:  8762b6199c = 245:  9cbdbc00dd tests: only override sort & find if there are usable ones in /usr/bin/
* 253:  9487dde5d1 = 246:  070ee46b0a mingw: introduce code to detect whether we're inside a Windows container
* 248:  88a5aaa1a7 = 247:  a65aabe7c5 tests: use the correct path separator with BusyBox
* 255:  f71968d12c = 248:  9fde46cef4 mingw: when running in a Windows container, try to rename() harder
* 249:  fe01671b33 = 249:  aa644f46bf mingw: only use Bash-ism `builtin pwd -W` when available
* 257:  83bac9592e = 250:  16d07f0ae7 mingw: move the file_attr_to_st_mode() function definition
* 250:  ac884960ce = 251:  9907e74e81 tests (mingw): remove Bash-specific pwd option
* 259:  1a7cfa1027 = 252:  55e2b36b2d mingw: Windows Docker volumes are *not* symbolic links
* 251:  dbc3d06b60 = 253:  abf0d6a942 test-lib: add BUSYBOX prerequisite
* 263:  7e7d149281 = 254:  763f360268 mingw: work around rename() failing on a read-only file
* 270:  046283af48 = 255:  955f7fe9de Merge branch 'gitk-and-git-gui-patches'
* 252:  abcbe42c46 = 256:  317bceedf4 t5003: use binary file from t/lib-diff/
* 271:  88ed85c62b = 257:  610e1a9157 Merge branch 'long-paths'
* 254:  e1ceb46028 = 258:  a27fd6fb99 t5532: workaround for BusyBox on Windows
* 272:  498462ce43 = 259:  4436d4eba2 Merge branch 'msys2'
* 256:  f873fff3ad = 260:  f080897177 t5605: special-case hardlink test for BusyBox-w32
* 273:  f8cb5be902 = 261:  c84281dc40 Merge 'docker-volumes-are-no-symlinks'
* 258:  d26ff40ee1 = 262:  a93c138365 t5813: allow for $PWD to be a Windows path
* 274:  fa9d898e57 = 263:  f2da2409f7 mingw: try resetting the read-only bit if rename fails (#4527)
* 260:  1ac549bc12 = 264:  35c2e26214 t9200: skip tests when $PWD contains a colon
* 275:  545a332533 = 265:  8bb8b37d85 Merge pull request #1897 from piscisaureus/symlink-attr
* 276:  bb4263920c = 266:  03d51da81f Describe Git for Windows' architecture
* 261:  672e40ade7 = 267:  3fa19d34ae mingw: kill child processes in a gentler way
* 264:  aeedf96f02 = 268:  6b6a0e6f97 mingw: optionally enable wsl compability file mode bits
* 277:  6b25886f87 = 269:  f1b758acea Merge branch 'busybox-w32'
* 278:  da52739799 = 270:  8ad26ab671 Modify the Code of Conduct for Git for Windows
* 265:  3750e90c2f = 271:  45145942b8 mingw: really handle SIGINT
* 279:  837f5dd3ba = 272:  602456feca Merge branch 'wsl-file-mode-bits'
* 280:  1ae6ea5a55 = 273:  bff0a6b3ba CONTRIBUTING.md: add guide for first-time contributors
* 266:  9ccd4e22f6 = 274:  f8e7cef858 Partially un-revert "editor: save and reset terminal after calling EDITOR"
* 281:  25eafd4321 = 275:  6c256928f3 Merge pull request #1170 from dscho/mingw-kill-process
* 282:  f7bc5743be = 276:  7573eb44a0 README.md: Add a Windows-specific preamble
* 267:  836b9421b0 = 277:  dfd58d5333 reset: reinstate support for the deprecated --stdin option
* 283:  aba1fe7a8c = 278:  201b41147d Merge branch 'un-revert-editor-save-and-reset'
* 284:  571cb6ddf9 = 279:  36e75bcdf8 Add an issue template
* 262:  17dc727af7 = 280:  d24d21d0fb Add a GitHub workflow to monitor component updates
* 268:  12cf31c18e = 281:  edb6c94af0 fsmonitor: reintroduce core.useBuiltinFSMonitor
* 285:  54eb9f9615 = 282:  053f2bb493 Merge branch 'phase-out-reset-stdin'
* 286:  f8fdd09f3a = 283:  2f0271755c Modify the GitHub Pull Request template (to reflect Git for Windows)
* 269:  ddcdbb074f = 284:  9af4b25272 dependabot: help keeping GitHub Actions versions up to date
* 287:  f1a85a3b4e = 285:  e52444fbfb Merge branch 'deprecate-core.useBuiltinFSMonitor'
* 288:  12e0d0f672 = 286:  0183d8cd7a SECURITY.md: document Git for Windows' policies
* 289:  ac9d476e37 = 287:  ad8b64e0f7 Merge pull request #2837 from dscho/monitor-component-updates
* 290:  45ba1c73b0 = 288:  5b50e258f2 Merge 'readme' into HEAD

</details>

dscho and others added 30 commits April 21, 2026 02:20
The native Windows HTTPS backend is based on Secure Channel which lets
the caller decide how to handle revocation checking problems caused by
missing information in the certificate or offline CRL distribution
points.

Unfortunately, cURL chose to handle these problems differently than
OpenSSL by default: while OpenSSL happily ignores those problems
(essentially saying "¯\_(ツ)_/¯"), the Secure Channel backend will error
out instead.

As a remedy, the "no revoke" mode was introduced, which turns off
revocation checking altogether. This is a bit heavy-handed. We support
this via the `http.schannelCheckRevoke` setting.

In curl/curl#4981, we contributed an opt-in
"best effort" strategy that emulates what OpenSSL seems to do.

In Git for Windows, we actually want this to be the default. This patch
makes it so, introducing it as a new value for the
`http.schannelCheckRevoke" setting, which now becmes a tristate: it
accepts the values "false", "true" or "best-effort" (defaulting to the
last one).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The convention in Git project's shell scripts is to have white-space
_before_, but not _after_ the `>` (or `<`).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This change enhances `git commit --cleanup=scissors` by detecting
scissors lines ending in either LF (UNIX-style) or CR/LF (DOS-style).

Regression tests are included to specifically test for trailing
comments after a CR/LF-terminated scissors line.

Signed-off-by: Luke Bonanomi <lbonanomi@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
For some reason, this test case was indented with 4 spaces instead of 1
horizontal tab. The other test cases in the same test script are fine.

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As of Git v2.28.0, the diff for files staged via `git add -N` marks them
as new files. Git GUI was ill-prepared for that, and this patch teaches
Git GUI about them.

Please note that this will not even fix things with v2.28.0, as the
`rp/apply-cached-with-i-t-a` patches are required on Git's side, too.

This fixes git-for-windows#2779

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
The vcpkg downloads may not succeed. Warn careful readers of the time out.

A simple retry will usually resolve the issue.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
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 <dennis@dennisameling.com>
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 <johannes.schindelin@gmx.de>
Signed-off-by: Vilius Šumskas <vilius@sumskas.eu>
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 <johannes.schindelin@gmx.de>
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 <pascalmuller@gmail.com>
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 <vdye@github.com>
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 <philipoakley@iee.email>
This is no longer true in general, not with supporting Clang out of the
box.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This option was added in fa93bb2 (MinGW: Fix stat definitions to
work with MinGW runtime version 4.0, 2013-09-11), i.e. a _long_ time
ago. So long, in fact, that it still targeted MinGW. But we switched to
mingw-w64 in 2015, which seems not to share the problem, and therefore
does not require a fix.

Even worse: This flag is incompatible with UCRT64, which we are about to
support by way of upstreaming `mingw-w64-git` to the MSYS2 project, see
msys2/MINGW-packages#26470 for details.

So let's send that option into its well-deserved retirement.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge this early to resolve merge conflicts early.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
That option only matters there, and is in fact only really understood in
those builds; UCRT64 versions of GCC, for example, do not know what to
do with that option.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When building with `make MSVC=1 DEBUG=1`, link to `libexpatd.lib`
rather than `libexpat.lib`.

It appears that the `vcpkg` package for "libexpat" has changed and now
creates `libexpatd.lib` for debug mode builds.  Previously, both debug
and release builds created a ".lib" with the same basename.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
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 <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In bf2d5d8 (Don't let ld strip relocations, 2016-01-16) (picked from
git-for-windows@6a237925bf10),
Git for Windows introduced the `-Wl,-pic-executable` flag, specifying
the exact entry point via `-e`. This required discerning between i686
and x86_64 code because the former required the symbol to be prefixed
with an underscore, the latter did not.

As per https://sourceware.org/bugzilla/show_bug.cgi?id=10865, the
specified symbols are already the default, though.

So let's drop the overly-specific definition.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
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 <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MSYS2 already defines a couple of helpful environment variables, and we
can use those to infer the installation location as well as the CPU. No
need for hard-coding ;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Create a wrapper for the Windows Resource Compiler (RC.EXE)
for use by the MSVC=1 builds. This is similar to the CL.EXE
and LIB.EXE wrappers used for the MSVC=1 builds.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
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 <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The tell-tale is the presence of the `MSYSTEM` value while compiling, of
course. In that case, we want to ensure that `MSYSTEM` is set when
running `git.exe`, and also enable the magic MSYS2 tty detection.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Teach MSVC=1 builds to depend on the `git.rc` file so that
the resulting executables have Windows-style resources and
version number information within them.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
This compile-time option allows to ask Git to load libcurl dynamically
at runtime.

Together with a follow-up patch that optionally overrides the file name
depending on the `http.sslBackend` setting, this kicks open the door for
installing multiple libcurl flavors side by side, and load the one
corresponding to the (runtime-)configured SSL/TLS backend.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Start work on a new 'git survey' command to scan the repository
for monorepo performance and scaling problems.  The goal is to
measure the various known "dimensions of scale" and serve as a
foundation for adding additional measurements as we learn more
about Git monorepo scaling problems.

The initial goal is to complement the scanning and analysis performed
by the GO-based 'git-sizer' (https://github.com/github/git-sizer) tool.
It is hoped that by creating a builtin command, we may be able to take
advantage of internal Git data structures and code that is not
accessible from GO to gain further insight into potential scaling
problems.

Co-authored-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
dscho and others added 30 commits April 21, 2026 02:22
When t5605 tries to verify that files are hardlinked (or that they are
not), it uses the `-links` option of the `find` utility.

BusyBox' implementation does not support that option, and BusyBox-w32's
lstat() does not even report the number of hard links correctly (for
performance reasons).

So let's just switch to a different method that actually works on
Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This was pull request git-for-windows#1645 from ZCube/master

Support windows container.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Git for Windows uses MSYS2's Bash to run the test suite, which comes
with benefits but also at a heavy price: on the plus side, MSYS2's
POSIX emulation layer allows us to continue pretending that we are on a
Unix system, e.g. use Unix paths instead of Windows ones, yet this is
bought at a rather noticeable performance penalty.

There *are* some more native ports of Unix shells out there, though,
most notably BusyBox-w32's ash. These native ports do not use any POSIX
emulation layer (or at most a *very* thin one, choosing to avoid
features such as fork() that are expensive to emulate on Windows), and
they use native Windows paths (usually with forward slashes instead of
backslashes, which is perfectly legal in almost all use cases).

And here comes the problem: with a $PWD looking like, say,
C:/git-sdk-64/usr/src/git/t/trash directory.t5813-proto-disable-ssh
Git's test scripts get quite a bit confused, as their assumptions have
been shattered. Not only does this path contain a colon (oh no!), it
also does not start with a slash.

This is a problem e.g. when constructing a URL as t5813 does it:
ssh://remote$PWD. Not only is it impossible to separate the "host" from
the path with a $PWD as above, even prefixing $PWD by a slash won't
work, as /C:/git-sdk-64/... is not a valid path.

As a workaround, detect when $PWD does not start with a slash on
Windows, and simply strip the drive prefix, using an obscure feature of
Windows paths: if an absolute Windows path starts with a slash, it is
implicitly prefixed by the drive prefix of the current directory. As we
are talking about the current directory here, anyway, that strategy
works.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…ws#4527)

With this patch, Git for Windows works as intended on mounted APFS
volumes (where renaming read-only files would fail).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, the current working directory is pretty much guaranteed to
contain a colon. If we feed that path to CVS, it mistakes it for a
separator between host and port, though.

This has not been a problem so far because Git for Windows uses MSYS2's
Bash using a POSIX emulation layer that also pretends that the current
directory is a Unix path (at least as long as we're in a shell script).

However, that is rather limiting, as Git for Windows also explores other
ports of other Unix shells. One of those is BusyBox-w32's ash, which is
a native port (i.e. *not* using any POSIX emulation layer, and certainly
not emulating Unix paths).

So let's just detect if there is a colon in $PWD and punt in that case.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Git for Windows project has grown quite complex over the years,
certainly much more complex than during the first years where the
`msysgit.git` repository was abusing Git for package management purposes
and the `git/git` fork was called `4msysgit.git`.

Let's describe the status quo in a thorough way.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The TerminateProcess() function does not actually leave the child
processes any chance to perform any cleanup operations. This is bad
insofar as Git itself expects its signal handlers to run.

A symptom is e.g. a left-behind .lock file that would not be left behind
if the same operation was run, say, on Linux.

To remedy this situation, we use an obscure trick: we inject a thread
into the process that needs to be killed and to let that thread run the
ExitProcess() function with the desired exit status. Thanks J Wyman for
describing this trick.

The advantage is that the ExitProcess() function lets the atexit
handlers run. While this is still different from what Git expects (i.e.
running a signal handler), in practice Git sets up signal handlers and
atexit handlers that call the same code to clean up after itself.

In case that the gentle method to terminate the process failed, we still
fall back to calling TerminateProcess(), but in that case we now also
make sure that processes spawned by the spawned process are terminated;
TerminateProcess() does not give the spawned process a chance to do so
itself.

Please note that this change only affects how Git for Windows tries to
terminate processes spawned by Git's own executables. Third-party
software that *calls* Git and wants to terminate it *still* need to make
sure to imitate this gentle method, otherwise this patch will not have
any effect.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Windows Subsystem for Linux (WSL) version 2 allows to use `chmod` on
NTFS volumes provided that they are mounted with metadata enabled (see
https://devblogs.microsoft.com/commandline/chmod-chown-wsl-improvements/
for details), for example:

	$ chmod 0755 /mnt/d/test/a.sh

In order to facilitate better collaboration between the Windows
version of Git and the WSL version of Git, we can make the Windows
version of Git also support reading and writing NTFS file modes
in a manner compatible with WSL.

Since this slightly slows down operations where lots of files are
created (such as an initial checkout), this feature is only enabled when
`core.WSLCompat` is set to true. Note that you also have to set
`core.fileMode=true` in repositories that have been initialized without
enabling WSL compatibility.

There are several ways to enable metadata loading for NTFS volumes
in WSL, one of which is to modify `/etc/wsl.conf` by adding:

```
[automount]
enabled = true
options = "metadata,umask=027,fmask=117"
```

And reboot WSL.

It can also be enabled temporarily by this incantation:

	$ sudo umount /mnt/c &&
	  sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000,umask=22,fmask=111

It's important to note that this modification is compatible with, but
does not depend on WSL. The helper functions in this commit can operate
independently and functions normally on devices where WSL is not
installed or properly configured.

Signed-off-by: xungeng li <xungeng@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Git project followed Git for Windows' lead and added their Code of
Conduct, based on the Contributor Covenant v1.4, later updated to v2.0.

We adapt it slightly to Git for Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Previously, we did not install any handler for Ctrl+C, but now we really
want to because the MSYS2 runtime learned the trick to call the
ConsoleCtrlHandler when Ctrl+C was pressed.

With this, hitting Ctrl+C while `git log` is running will only terminate
the Git process, but not the pager. This finally matches the behavior on
Linux and on macOS.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This patch introduces support to set special NTFS attributes that are
interpreted by the Windows Subsystem for Linux as file mode bits, UID
and GID.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Getting started contributing to Git can be difficult on a Windows
machine. CONTRIBUTING.md contains a guide to getting started, including
detailed steps for setting up build tools, running tests, and
submitting patches to upstream.

[includes an example by Pratik Karki how to submit v2, v3, v4, etc.]

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
…ITOR"

In e3f7e01 (Revert "editor: save and reset terminal after calling
EDITOR", 2021-11-22), we reverted the commit wholesale where the
terminal state would be saved and restored before/after calling an
editor.

The reverted commit was intended to fix a problem with Windows Terminal
where simply calling `vi` would cause problems afterwards.

To fix the problem addressed by the revert, but _still_ keep the problem
with Windows Terminal fixed, let's revert the revert, with a twist: we
restrict the save/restore _specifically_ to the case where `vi` (or
`vim`) is called, and do not do the same for any other editor.

This should still catch the majority of the cases, and will bridge the
time until the original patch is re-done in a way that addresses all
concerns.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Handle Ctrl+C in Git Bash nicely

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Includes touch-ups by 마누엘, Philip Oakley and 孙卓识.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `--stdin` option was a well-established paradigm in other commands,
therefore we implemented it in `git reset` for use by Visual Studio.

Unfortunately, upstream Git decided that it is time to introduce
`--pathspec-from-file` instead.

To keep backwards-compatibility for some grace period, we therefore
reinstate the `--stdin` option on top of the `--pathspec-from-file`
option, but mark it firmly as deprecated.

Helped-by: Victoria Dye <vdye@github.com>
Helped-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and
Philip Oakley.

Helped-by: Clive Chan <cc@clive.io>
Helped-by: Adric Norris <landstander668@gmail.com>
Helped-by: Ben Bodenmiller <bbodenmiller@hotmail.com>
Helped-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Brendan Forster <brendan@github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Rather than using private IFTTT Applets that send mails to this
maintainer whenever a new version of a Git for Windows component was
released, let's use the power of GitHub workflows to make this process
publicly visible.

This workflow monitors the Atom/RSS feeds, and opens a ticket whenever a
new version was released.

Note: Bash sometimes releases multiple patched versions within a few
minutes of each other (i.e. 5.1p1 through 5.1p4, 5.0p15 and 5.0p16). The
MSYS2 runtime also has a similar system. We can address those patches as
a group, so we shouldn't get multiple issues about them.

Note further: We're not acting on newlib releases, OpenSSL alphas, Perl
release candidates or non-stable Perl releases. There's no need to open
issues about them.

Co-authored-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reintroduce the 'core.useBuiltinFSMonitor' config setting (originally added
in 0a756b2 (fsmonitor: config settings are repository-specific,
2021-03-05)) after its removal from the upstream version of FSMonitor.

Upstream, the 'core.useBuiltinFSMonitor' setting was rendered obsolete by
"overloading" the 'core.fsmonitor' setting to take a boolean value. However,
several applications (e.g., 'scalar') utilize the original config setting,
so it should be preserved for a deprecation period before complete removal:

* if 'core.fsmonitor' is a boolean, the user is correctly using the new
  config syntax; do not use 'core.useBuiltinFSMonitor'.
* if 'core.fsmonitor' is unspecified, use 'core.useBuiltinFSMonitor'.
* if 'core.fsmonitor' is a path, override and use the builtin FSMonitor if
  'core.useBuiltinFSMonitor' is 'true'; otherwise, use the FSMonitor hook
  indicated by the path.

Additionally, for this deprecation period, advise users to switch to using
'core.fsmonitor' to specify their use of the builtin FSMonitor.

Signed-off-by: Victoria Dye <vdye@github.com>
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 <johannes.schindelin@gmx.de>
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 <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
This is the recommended way on GitHub to describe policies revolving around
security issues and about supported versions.

Helped-by: Sven Strickroth <email@cs-ware.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…updates

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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.