Skip to content

Rebase to v2.51.0-rc1 #5761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 394 commits into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
394 commits
Select commit Hold shift + click to select a range
b7038fd
CMake: default Visual Studio generator has changed
PhilipOakley Jul 1, 2021
6bb7fdf
compat/vcbuild: document preferred way to build in Visual Studio
dscho May 17, 2021
993f1d9
http: optionally send SSL client certificate
pascalmuller Jun 23, 2021
361b470
ci: run `contrib/subtree` tests in CI builds
vdye Aug 5, 2021
c3b7339
.gitignore: add Visual Studio CMakeSetting.json file
PhilipOakley Apr 24, 2021
bbbfda9
CMakeLists: add default "x64-windows" arch for Visual Studio
PhilipOakley Apr 22, 2021
7f4d9ee
hash-object: demonstrate a >4GB/LLP64 problem
PhilipOakley Oct 31, 2021
3574ce8
CMake: show Win32 and Generator_platform build-option values
PhilipOakley May 10, 2021
b655773
init: do parse _all_ core.* settings early
dscho Sep 8, 2021
80d9a9f
object-file.c: use size_t for header lengths
PhilipOakley Nov 12, 2021
30774b0
hash algorithms: use size_t for section lengths
PhilipOakley Nov 12, 2021
46f0c25
hash-object --stdin: verify that it works with >4GB/LLP64
PhilipOakley Dec 6, 2021
e98dc20
hash-object: add another >4GB/LLP64 test case
PhilipOakley Dec 6, 2021
b8751fc
hash-object: add a >4GB/LLP64 test case using filtered input
PhilipOakley Dec 7, 2021
ed98746
setup: properly use "%(prefix)/" when in WSL
derrickstolee Apr 13, 2022
4bac2ae
compat/mingw.c: do not warn when failing to get owner
derrickstolee Apr 13, 2022
05b6072
mingw: $env:TERM="xterm-256color" for newer OSes
rkitover Apr 12, 2022
597e0cf
winansi: check result and Buffer before using Name
1480c1 May 28, 2022
39ea249
Add config option `windows.appendAtomically`
sunzhuoshi Jan 15, 2022
866079e
mingw: change core.fsyncObjectFiles = 1 by default
dscho Sep 4, 2017
96a09e1
http: optionally load libcurl lazily
dscho May 6, 2023
1a852ee
MinGW: link as terminal server aware
rimrul Jul 10, 2022
94b21c5
Fix Windows version resources
Mortein Nov 2, 2022
8a4f8d7
status: fix for old-style submodules with commondir
sceptical-coder Oct 28, 2022
d6d22c9
windows: skip linking `git-<command>` for built-ins
dscho Jan 27, 2023
3ac339d
http: support lazy-loading libcurl also on Windows
dscho May 7, 2023
9396450
http: when loading libcurl lazily, allow for multiple SSL backends
dscho May 7, 2023
3de9968
mingw: do load libcurl dynamically by default
dscho May 7, 2023
f2e6e80
Add a GitHub workflow to verify that Git/Scalar work in Nano Server
dscho Nov 2, 2022
1396cfe
mingw: suggest `windows.appendAtomically` in more cases
dsl101 Jul 28, 2023
0a54c86
win32: use native ANSI sequence processing, if possible
dscho Nov 22, 2023
8ffdd96
git.rc: include winuser.h
rimrul Dec 2, 2023
4a69a66
common-main.c: fflush stdout buffer upon exit
chengzhuo5 Apr 8, 2024
4b6988e
t5601/t7406(mingw): do run tests with symlink support
dscho Apr 9, 2024
c0241bb
win32: ensure that `localtime_r()` is declared even in i686 builds
dscho May 21, 2024
d35a6a6
Fallback to AppData if XDG_CONFIG_HOME is unset
ariellourenco Jul 2, 2024
ff4bc65
run-command: be helpful with Git LFS fails on Windows 7
dscho Jul 4, 2024
60ecdbe
survey: stub in new experimental 'git-survey' command
Apr 29, 2024
c761c89
survey: add command line opts to select references
Apr 29, 2024
2feb55d
survey: start pretty printing data in table form
derrickstolee Sep 1, 2024
b89ad5d
survey: add object count summary
derrickstolee Sep 2, 2024
c700afb
survey: summarize total sizes by object type
derrickstolee Sep 2, 2024
c9c8600
survey: show progress during object walk
derrickstolee Sep 2, 2024
841504b
survey: add ability to track prioritized lists
derrickstolee Sep 2, 2024
b628190
revision: create mark_trees_uninteresting_dense()
derrickstolee Sep 6, 2024
241efb8
ci: work around a problem with HTTP/2 vs libcurl v8.10.0
dscho Sep 24, 2024
9c6d22a
mingw: make sure `errno` is set correctly when socket operations fail
dscho Nov 14, 2019
7687e2b
compat/mingw: handle WSA errors in strerror
rimrul Dec 22, 2024
18d0713
survey: add report of "largest" paths
derrickstolee Sep 2, 2024
40b82da
compat/mingw: drop outdated comment
rimrul Dec 22, 2024
6d57e41
survey: add --top=<N> option and config
derrickstolee Sep 23, 2024
536c3fb
t0301: actually test credential-cache on Windows
rimrul Dec 29, 2024
dea4ec2
survey: clearly note the experimental nature in the output
dscho Jul 1, 2024
d2c6814
credential-cache: handle ECONNREFUSED gracefully
rimrul Dec 22, 2024
bc1a54f
max_tree_depth: lower it for clangarm64 on Windows
dscho Apr 15, 2025
5ebf831
reftable: do make sure to use custom allocators
dscho Mar 6, 2025
9866ce3
Merge branch 'reftable-vs-cmake'
dscho Aug 3, 2025
b6050e1
Merge branch 'organize-mingw-includes'
dscho Jun 2, 2025
998a8a0
Merge 'remote-hg-prerequisites' into HEAD
dscho Jun 8, 2018
2e33155
Merge branch 'drive-prefix'
dscho Jun 8, 2018
8a23e89
check-whitespace: avoid alerts about upstream commits
dscho Jun 3, 2025
eb66b05
refs: forbid clang to complain about unreachable code
dscho Jun 4, 2025
a81931a
mingw: avoid the comma operator
dscho Jun 5, 2025
ff4a1cd
Merge branch 'dont-clean-junctions'
dscho Jul 30, 2019
c4f041b
Merge branch 'msys2-python'
dscho May 31, 2019
5e8e5ce
Merge branch 'mimalloc-v2.2.3'
dscho Sep 8, 2022
8045aa7
Merge pull request #2375 from assarbad/reintroduce-sideband-config
dscho Oct 30, 2019
774bc9f
Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
dscho Jan 3, 2020
d92fac5
Merge pull request #2488 from bmueller84/master
dscho Jan 22, 2020
9dd8fa7
Merge pull request #2501 from jeffhostetler/clink-debug-curl
dscho Jan 30, 2020
c73988a
Merge pull request #2504 from dscho/access-repo-via-junction
dscho Feb 1, 2020
386ae3e
Merge pull request #2506 from dscho/issue-2283
dscho Feb 11, 2020
c46d68d
Merge pull request #2535 from dscho/schannel-revoke-best-effort
dscho Mar 4, 2020
6074eff
Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
dscho May 9, 2020
643b104
Merge 'add-p-many-files'
dscho Jun 8, 2018
bed55f3
Merge pull request #2714 from lbonanomi/crlf-scissors
dscho Jul 3, 2020
92d3a13
Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
dscho Oct 9, 2020
8302696
Merge 'git-gui/js/intent-to-add'
dscho Oct 18, 2020
06626aa
Merge pull request #2974 from derrickstolee/maintenance-and-headless
dscho Jan 11, 2021
29b2b8a
cmake: install headless-git. (#4338)
dscho Mar 13, 2023
bd543dd
Merge pull request #2351 from PhilipOakley/vcpkg-tip
dscho Oct 7, 2019
f89a5e6
Merge pull request #2915 from dennisameling/windows-arm64-support
dscho Dec 9, 2020
c8eed92
Merge pull request #3327 from dennisameling/fix-host-cpu
dscho Jul 19, 2021
f6e7725
Merge pull request #3165 from dscho/increase-allowed-length-of-interp…
dscho Apr 3, 2021
270fb30
Merge pull request #3220 from dscho/there-is-no-vs/master-anymore
dscho May 17, 2021
759ad26
Merge pull request #3293 from pascalmuller/http-support-automatically…
dscho Jun 24, 2021
9306198
Merge pull request #3349 from vdye/feature/ci-subtree-tests
dscho Aug 10, 2021
8155422
Merge pull request #3306 from PhilipOakley/vs-sln
dscho Oct 12, 2021
7492035
Merge pull request #3417 from dscho/initialize-core.symlinks-earlier
dscho Oct 13, 2021
c61b15f
Merge pull request #3533 from PhilipOakley/hashliteral_t
dscho Dec 15, 2021
46ad4c0
Merge pull request #3791: Various fixes around `safe.directory`
derrickstolee Apr 13, 2022
b92d504
Merge pull request #3751 from rkitover/native-term
dscho Apr 21, 2022
af4642e
Merge pull request #3875 from 1480c1/wine/detect_msys_tty
dscho May 30, 2022
c071710
Merge branch 'optionally-dont-append-atomically-on-windows'
dscho Jun 23, 2022
1ebf9a7
Merge branch 'fsync-object-files-always'
dscho Oct 11, 2018
656cf95
Merge pull request #3942 from rimrul/mingw-tsaware
dscho Jul 27, 2022
b85af4d
Fix Windows version resources (#4092)
dscho Nov 3, 2022
260ce55
Fix global repository field not being cleared (#4083)
dscho Dec 20, 2022
99590f3
Skip linking the "dashed" `git-<command>`s for built-ins (#4252)
dscho Jan 31, 2023
6896939
Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl (…
dscho May 15, 2023
eb24cc9
Merge branch 'nano-server'
dscho Aug 7, 2023
4b75131
Additional error checks for issuing the windows.appendAtomically warn…
dscho Aug 7, 2023
3639b3d
win32: use native ANSI sequence processing, if possible (#4700)
dscho Dec 2, 2023
b4943a5
ARM64: Embed manifest properly (#4718)
dscho Dec 7, 2023
06470f9
common-main.c: fflush stdout buffer when exit (#4901)
dscho Apr 12, 2024
4cf1114
Merge branch 'run-t5601-and-t7406-with-symlinks-on-windows-10'
dscho Jul 12, 2024
0c3ce26
Merge branch 'Fix-i686-build-with-GCC-v14'
dscho Jul 12, 2024
7e363bb
Merge branch 'Fallback-to-AppData-if-XDG-CONFIG-HOME-is-unset'
dscho Jul 12, 2024
c58bf6f
Merge branch 'run-command-be-helpful-when-Git-LFS-fails-on-Windows-7'
dscho Jul 12, 2024
1e73447
pack-objects: create new name-hash algorithm (#5157)
dscho Sep 24, 2024
9832a1e
Add path walk API and its use in 'git pack-objects' (#5171)
derrickstolee Sep 25, 2024
d63cb8c
Add experimental 'git survey' builtin (#5174)
dscho Sep 26, 2024
2cb9b6e
credential-cache: handle ECONNREFUSED gracefully (#5329)
dscho Jan 1, 2025
b37445e
clangarm64: let the tests pass! (#5586)
dscho Apr 21, 2025
7de0cae
Merge branch 'reftable-vs-custom-allocators'
dscho Jun 2, 2025
1dbd3e0
Merge branch 'check-whitespace-only-downstream'
dscho Jun 3, 2025
01f01fa
Merge branch 'refs-clang-fix'
dscho Jun 11, 2025
05ab795
mingw: avoid the comma operator (#5660)
dscho Jun 5, 2025
c63b3f9
Merge branch 'ready-for-upstream'
dscho Oct 11, 2018
158550c
git-gui: provide question helper for retry fallback on Windows
hvoigt Feb 21, 2010
769404b
Win32: make FILETIME conversion functions public
kblees Jul 6, 2013
6373b59
Win32: dirent.c: Move opendir down
kblees Sep 8, 2013
520fee2
mingw: make the dirent implementation pluggable
kblees Sep 8, 2013
f9cc680
Win32: make the lstat implementation pluggable
kblees Sep 8, 2013
1bd6d7d
mingw: add infrastructure for read-only file system level caches
kblees Sep 8, 2013
cf9b5bd
mingw: add a cache below mingw's lstat and dirent implementations
kblees Oct 1, 2013
e57e320
fscache: load directories only once
kblees Jun 24, 2014
c8c89f6
fscache: add key for GIT_TRACE_FSCACHE
jeffhostetler Jan 24, 2017
f4d75f4
fscache: remember not-found directories
jeffhostetler Dec 13, 2016
7ba0368
fscache: add a test for the dir-not-found optimization
dscho Jan 25, 2017
1f568a3
add: use preload-index and fscache for performance
jeffhostetler Nov 22, 2016
43edf37
dir.c: make add_excludes aware of fscache during status
jeffhostetler Nov 1, 2017
7424e57
fscache: make fscache_enabled() public
jeffhostetler Dec 20, 2017
90fe4ab
dir.c: regression fix for add_excludes with fscache
jeffhostetler Dec 20, 2017
0dd21e9
fetch-pack.c: enable fscache for stats under .git/objects
Nov 22, 2017
b208baa
checkout.c: enable fscache for checkout again
Jan 30, 2018
0d7af51
Enable the filesystem cache (fscache) in refresh_index().
benpeart Sep 7, 2018
8126576
fscache: use FindFirstFileExW to avoid retrieving the short name
benpeart Oct 23, 2018
16a7fb5
fscache: add GIT_TEST_FSCACHE support
benpeart Oct 4, 2018
143dbf0
fscache: add fscache hit statistics
benpeart Sep 25, 2018
fb9a86a
mem_pool: add GIT_TRACE_MEMPOOL support
benpeart Oct 4, 2018
6562ddf
fscache: fscache takes an initial size
benpeart Nov 2, 2018
bb8bf03
fscache: update fscache to be thread specific instead of global
benpeart Oct 4, 2018
e2670dd
fscache: teach fscache to use mempool
benpeart Nov 2, 2018
805d2de
unpack-trees: enable fscache for sparse-checkout
derrickstolee Jun 12, 2019
0fd386c
status: disable and free fscache at the end of the status command
benpeart Nov 1, 2018
d7e3bba
fscache: remember the reparse tag for each entry
dscho Dec 11, 2018
577a11e
fscache: make fscache_enable() thread safe
benpeart Nov 16, 2018
c14b39f
fscache: implement an FSCache-aware is_mount_point()
dscho Dec 11, 2018
5153074
fscache: teach fscache to use NtQueryDirectoryFile
benpeart Nov 15, 2018
83400d6
clean: make use of FSCache
dscho Dec 11, 2018
d6f6535
Merge branch 'fscache'
dscho Nov 15, 2018
4ed37d5
Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
dscho Nov 5, 2018
a4f4ca9
Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
dscho Nov 16, 2018
f5acf4c
Merge branch 'dont-clean-junctions-fscache'
dscho Jul 23, 2019
5324012
pack-objects (mingw): demonstrate a segmentation fault with large deltas
vangdfang Jan 9, 2014
c15de28
mingw: support long paths
kblees Jul 28, 2015
d2e93d8
Win32: fix 'lstat("dir/")' with long paths
kblees Jul 4, 2014
4c7dbf6
strbuf_readlink: don't call readlink twice if hint is the exact link …
kblees May 11, 2015
cc0f6f2
win32(long path support): leave drive-less absolute paths intact
dscho Sep 6, 2023
2afc494
mingw: Support `git_terminal_prompt` with more terminals
kblees Mar 19, 2015
c10002f
strbuf_readlink: support link targets that exceed PATH_MAX
kblees May 11, 2015
82bc028
compat/fsmonitor/fsm-*-win32: support long paths
jeffhostetler Mar 25, 2022
1b5a04e
compat/terminal.c: only use the Windows console if bash 'read -r' fails
kblees May 9, 2015
56c192f
lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
kblees May 11, 2015
2354e5d
clean: suggest using `core.longPaths` if paths are too long to remove
mathstuf Apr 22, 2022
8df2bf3
mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
dscho Feb 23, 2018
01f5684
Win32: don't call GetFileAttributes twice in mingw_lstat()
kblees May 12, 2015
1f84a66
Win32: implement stat() with symlink support
kblees May 15, 2015
2753fc2
Win32: remove separate do_lstat() function
kblees May 11, 2015
66d95c7
Win32: let mingw_lstat() error early upon problems with reparse points
kblees May 23, 2015
a2e2baf
mingw: teach fscache and dirent about symlinks
kblees Jan 10, 2017
2d9dc83
Win32: lstat(): return adequate stat.st_size for symlinks
kblees May 15, 2015
e0ef4bc
Win32: factor out retry logic
kblees May 19, 2015
68bedf0
Win32: change default of 'core.symlinks' to false
kblees May 23, 2015
921c210
Win32: add symlink-specific error codes
kblees May 15, 2015
23f48a2
Win32: mingw_unlink: support symlinks to directories
kblees May 23, 2015
eafa8dc
Win32: mingw_rename: support renaming symlinks
kblees May 19, 2015
f0e67ad
Win32: mingw_chdir: change to symlink-resolved directory
kblees May 23, 2015
689c2aa
Win32: implement readlink()
kblees May 23, 2015
b3490db
mingw: lstat: compute correct size for symlinks
billziss-gh May 28, 2020
3ad85c9
Win32: implement basic symlink() functionality (file symlinks only)
kblees May 23, 2015
d57bb5e
Win32: symlink: add support for symlinks to directories
kblees May 23, 2015
830091d
mingw: try to create symlinks without elevated permissions
dscho May 30, 2017
1bf11bf
mingw: emulate stat() a little more faithfully
dscho Mar 2, 2020
2607df8
mingw: special-case index entries for symlinks with buggy size
dscho Jun 4, 2020
7df3104
mingw: introduce code to detect whether we're inside a Windows container
ZCube Apr 23, 2018
79f277e
mingw: when running in a Windows container, try to rename() harder
ZCube Apr 23, 2018
f7ee462
mingw: move the file_attr_to_st_mode() function definition
ZCube Apr 23, 2018
eded9cf
mingw: Windows Docker volumes are *not* symbolic links
dscho Apr 23, 2018
31d0a55
mingw: work around rename() failing on a read-only file
dsl101 Jul 28, 2023
c8c85a9
Win32: symlink: move phantom symlink creation to a separate function
piscisaureus Oct 26, 2018
eba3a62
Introduce helper to create symlinks that knows about index_state
dscho Feb 11, 2019
6b31be9
mingw: allow to specify the symlink type in .gitattributes
piscisaureus Oct 26, 2018
5050014
Win32: symlink: add test for `symlink` attribute
piscisaureus Oct 26, 2018
9122d9a
mingw: explicitly specify with which cmd to prefix the cmdline
dscho Jul 20, 2017
7f7a044
mingw: when path_lookup() failed, try BusyBox
dscho Jul 20, 2017
15d5e67
test-tool: learn to act as a drop-in replacement for `iconv`
dscho Jul 20, 2017
4bd09b1
tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
dscho Jul 20, 2017
c363feb
gitattributes: mark .png files as binary
dscho Oct 11, 2018
5de63fe
tests: move test PNGs into t/lib-diff/
dscho Aug 5, 2017
e6b362f
tests: only override sort & find if there are usable ones in /usr/bin/
dscho Jul 17, 2017
01976e1
tests: use the correct path separator with BusyBox
dscho Nov 19, 2018
46172d5
mingw: only use Bash-ism `builtin pwd -W` when available
dscho Jun 29, 2017
cd9c244
tests (mingw): remove Bash-specific pwd option
dscho Jun 30, 2017
98aa60f
test-lib: add BUSYBOX prerequisite
dscho Jul 19, 2017
f360cae
t5003: use binary file from t/lib-diff/
dscho Aug 5, 2017
0bfc796
t5532: workaround for BusyBox on Windows
dscho Jul 21, 2017
886726b
t5605: special-case hardlink test for BusyBox-w32
dscho Jul 21, 2017
f74d651
t5813: allow for $PWD to be a Windows path
dscho Jul 5, 2017
ed8c80d
t9200: skip tests when $PWD contains a colon
dscho Jul 7, 2017
1a79464
mingw: add a Makefile target to copy test artifacts
dscho Jul 19, 2017
292a3de
mingw: optionally enable wsl compability file mode bits
swigger Jun 7, 2023
232d1f9
mingw: kill child processes in a gentler way
dscho May 17, 2017
702063f
Add a GitHub workflow to monitor component updates
dscho Sep 29, 2020
19d06d0
mingw: really handle SIGINT
dscho Apr 22, 2018
750778e
mingw: do not call xutftowcs_path in mingw_mktemp
neerajsi-msft Oct 27, 2021
c6cbe6a
Partially un-revert "editor: save and reset terminal after calling ED…
dscho Nov 25, 2021
ccd5abf
reset: reinstate support for the deprecated --stdin option
dscho Dec 10, 2019
1a94733
fsmonitor: reintroduce core.useBuiltinFSMonitor
vdye Apr 4, 2022
cfa222d
dependabot: help keeping GitHub Actions versions up to date
dscho Feb 6, 2024
eeca726
Describe Git for Windows' architecture [no ci]
dscho Feb 13, 2023
2f531ac
Modify the Code of Conduct for Git for Windows
dscho Oct 11, 2019
de7aa7f
CONTRIBUTING.md: add guide for first-time contributors
derrickstolee Mar 1, 2018
d436478
README.md: Add a Windows-specific preamble
dscho Jan 10, 2014
576c111
Add an issue template
shiftkey Feb 18, 2016
c2c1617
Modify the GitHub Pull Request template (to reflect Git for Windows)
Dec 22, 2017
d109ffd
SECURITY.md: document Git for Windows' policies
dscho Aug 23, 2019
e93ed43
git-gui--askyesno: fix funny text wrapping
dscho Sep 20, 2017
06bb1c3
git-gui--askyesno: allow overriding the window title
dscho Sep 20, 2017
cee99b1
git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
dscho Jul 23, 2010
5be7898
git-gui--askyesno (mingw): use Git for Windows' icon, if available
dscho Sep 20, 2017
bfb01e0
Merge 'git-gui' into HEAD
dscho Jun 7, 2018
28d0dfe
Merge branch 'git-gui-askyesno'
dscho Jun 8, 2018
fb79d20
Merge branch 'gitk-and-git-gui-patches'
dscho Oct 11, 2018
c5b6dd5
Merge branch 'long-paths'
dscho Nov 15, 2018
1f898e4
Merge branch 'msys2'
dscho Nov 15, 2018
a767622
Merge branch 'kblees/kb/symlinks'
dscho Nov 15, 2018
06ee9ac
Merge 'docker-volumes-are-no-symlinks'
dscho Oct 12, 2018
4dbc100
mingw: try resetting the read-only bit if rename fails (#4527)
dscho Aug 7, 2023
fd285a4
Merge pull request #1897 from piscisaureus/symlink-attr
dscho Oct 31, 2018
176776b
Merge branch 'busybox-w32'
dscho Feb 7, 2019
2de2773
Merge branch 'wsl-file-mode-bits'
dscho Aug 7, 2023
c481e1d
Merge pull request #1170 from dscho/mingw-kill-process
dscho Oct 11, 2018
6a3769a
Merge pull request #3492 from dscho/ns/batched-fsync
vdye Oct 28, 2021
2771764
Merge branch 'un-revert-editor-save-and-reset'
dscho Jan 15, 2022
d3089df
Merge branch 'phase-out-reset-stdin'
dscho Jun 8, 2018
9f427e2
Merge branch 'deprecate-core.useBuiltinFSMonitor'
dscho Jan 24, 2023
b0d6ebe
Merge pull request #2837 from dscho/monitor-component-updates
dscho Oct 7, 2020
76d27a6
Merge 'readme' into HEAD
dscho Jun 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions Documentation/RelNotes/2.51.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ UI, Workflows & Features
* "git switch" and "git restore" are declared to be no longer
experimental.

* "git -c alias.foo=bar foo -h baz" reported "'foo' is aliased to
'bar'" and then went on to run "git foo -h baz", which was
unexpected. Tighten the rule so that alias expansion is reported
only when "-h" is the sole option.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand All @@ -92,8 +97,8 @@ Performance, Internal Implementation, Development Support etc.
* "git push" and "git fetch" are taught to update refs in batches to
gain performance.

* Some code paths in the "git prune" used to ignore passed in
repository object and used the_repository singleton instance
* Some code paths in "git prune" used to ignore the passed-in
repository object and used the `the_repository` singleton instance
instead, which has been corrected.

* Update ".clang-format" and ".editorconfig" to match our style guide
Expand Down Expand Up @@ -134,7 +139,10 @@ Performance, Internal Implementation, Development Support etc.
* Redefine where the multi-pack-index sits in the object subsystem,
which recently was restructured to allow multiple backends that
support a single object source that belongs to one repository. A
midx does span mulitple "object sources".
MIDX does span multiple "object sources".

* Reduce implicit assumption and dependence on the_repository in the
object-file subsystem.


Fixes since v2.50
Expand Down Expand Up @@ -284,6 +292,15 @@ including security updates, are included in this release.
and also they learn to honor the -U<n> command-line option.
(merge 2b3ae04011 lm/add-p-context later to maint).

* The case where a new submodule takes a path where there used to be a
completely different subproject is now dealt with a bit better than
before.
(merge 5ed8c5b465 kj/renamed-submodule later to maint).

* The deflate codepath in "git archive --format=zip" had a
longstanding bug coming from misuse of zlib API, which has been
corrected.

* Other code cleanup, docfix, build fix, etc.
(merge b257adb571 lo/my-first-ow-doc-update later to maint).
(merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
Expand Down Expand Up @@ -320,3 +337,5 @@ including security updates, are included in this release.
(merge 3bdd897413 ms/meson-with-ancient-git-wo-ls-files-dedup later to maint).
(merge cca758d324 kh/doc-fast-import-historical later to maint).
(merge 9b0781196a jc/test-hashmap-is-still-here later to maint).
(merge 1bad05bacc jk/revert-squelch-compiler-warning later to maint).
(merge 3a7e783d9c dl/squelch-maybe-uninitialized later to maint).
7 changes: 7 additions & 0 deletions Documentation/git-submodule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ OPTIONS
--force::
This option is only valid for add, deinit and update commands.
When running add, allow adding an otherwise ignored submodule path.
This option is also used to bypass a check that the submodule's name
is not already in use. By default, 'git submodule add' will fail if
the proposed name (which is derived from the path) is already registered
for another submodule in the repository. Using '--force' allows the command
to proceed by automatically generating a unique name by appending a number
to the conflicting name (e.g., if a submodule named 'child' exists, it will
try 'child1', and so on).
When running deinit the submodule working trees will be removed even
if they contain local changes.
When running update (only effective with the checkout procedure),
Expand Down
2 changes: 1 addition & 1 deletion GIT-VERSION-GEN
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

DEF_VER=v2.50.GIT
DEF_VER=v2.51.0-rc1

LF='
'
Expand Down
11 changes: 7 additions & 4 deletions apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -3621,7 +3621,7 @@ static int try_threeway(struct apply_state *state,

/* Preimage the patch was prepared for */
if (patch->is_new)
write_object_file("", 0, OBJ_BLOB, &pre_oid);
odb_write_object(the_repository->objects, "", 0, OBJ_BLOB, &pre_oid);
else if (repo_get_oid(the_repository, patch->old_oid_prefix, &pre_oid) ||
read_blob_object(&buf, &pre_oid, patch->old_mode))
return error(_("repository lacks the necessary blob to perform 3-way merge."));
Expand All @@ -3637,7 +3637,8 @@ static int try_threeway(struct apply_state *state,
return -1;
}
/* post_oid is theirs */
write_object_file(tmp_image.buf.buf, tmp_image.buf.len, OBJ_BLOB, &post_oid);
odb_write_object(the_repository->objects, tmp_image.buf.buf,
tmp_image.buf.len, OBJ_BLOB, &post_oid);
image_clear(&tmp_image);

/* our_oid is ours */
Expand All @@ -3650,7 +3651,8 @@ static int try_threeway(struct apply_state *state,
return error(_("cannot read the current contents of '%s'"),
patch->old_name);
}
write_object_file(tmp_image.buf.buf, tmp_image.buf.len, OBJ_BLOB, &our_oid);
odb_write_object(the_repository->objects, tmp_image.buf.buf,
tmp_image.buf.len, OBJ_BLOB, &our_oid);
image_clear(&tmp_image);

/* in-core three-way merge between post and our using pre as base */
Expand Down Expand Up @@ -4360,7 +4362,8 @@ static int add_index_file(struct apply_state *state,
}
fill_stat_cache_info(state->repo->index, ce, &st);
}
if (write_object_file(buf, size, OBJ_BLOB, &ce->oid) < 0) {
if (odb_write_object(the_repository->objects, buf, size,
OBJ_BLOB, &ce->oid) < 0) {
discard_cache_entry(ce);
return error(_("unable to create backing store "
"for newly created file %s"), path);
Expand Down
20 changes: 14 additions & 6 deletions archive-zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,22 @@ static int write_zip_entry(struct archiver_args *args,

zstream.next_in = buf;
zstream.avail_in = 0;
result = git_deflate(&zstream, Z_FINISH);
if (result != Z_STREAM_END)
die("deflate error (%d)", result);

do {
result = git_deflate(&zstream, Z_FINISH);
if (result != Z_OK && result != Z_STREAM_END)
die("deflate error (%d)", result);

out_len = zstream.next_out - compressed;
if (out_len > 0) {
write_or_die(1, compressed, out_len);
compressed_size += out_len;
zstream.next_out = compressed;
zstream.avail_out = sizeof(compressed);
}
} while (result != Z_STREAM_END);

git_deflate_end(&zstream);
out_len = zstream.next_out - compressed;
write_or_die(1, compressed, out_len);
compressed_size += out_len;
zip_offset += compressed_size;

write_zip_data_desc(size, compressed_size, crc);
Expand Down
2 changes: 1 addition & 1 deletion builtin/cat-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ static void batch_each_object(struct batch_options *opt,
};
struct bitmap_index *bitmap = prepare_bitmap_git(the_repository);

for_each_loose_object(batch_one_object_loose, &payload, 0);
for_each_loose_object(the_repository->objects, batch_one_object_loose, &payload, 0);

if (bitmap && !for_each_bitmapped_object(bitmap, &opt->objects_filter,
batch_one_object_bitmapped, &payload)) {
Expand Down
2 changes: 1 addition & 1 deletion builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static int checkout_merged(int pos, const struct checkout *state,
* (it also writes the merge result to the object database even
* when it may contain conflicts).
*/
if (write_object_file(result_buf.ptr, result_buf.size, OBJ_BLOB, &oid))
if (odb_write_object(the_repository->objects, result_buf.ptr, result_buf.size, OBJ_BLOB, &oid))
die(_("Unable to add merge result for '%s'"), path);
free(result_buf.ptr);
ce = make_transient_cache_entry(mode, &oid, path, 2, ce_mem_pool);
Expand Down
2 changes: 1 addition & 1 deletion builtin/count-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int cmd_count_objects(int argc,
report_linked_checkout_garbage(the_repository);
}

for_each_loose_file_in_objdir(repo_get_object_directory(the_repository),
for_each_loose_file_in_source(the_repository->objects->sources,
count_loose, count_cruft, NULL, NULL);

if (verbose) {
Expand Down
4 changes: 2 additions & 2 deletions builtin/fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,11 +822,11 @@ static char *keep_pack(const char *curr_index_name)
die_errno("failed to write keep file");

odb_pack_name(pack_data->repo, &name, pack_data->hash, "pack");
if (finalize_object_file(pack_data->pack_name, name.buf))
if (finalize_object_file(pack_data->repo, pack_data->pack_name, name.buf))
die("cannot store pack file");

odb_pack_name(pack_data->repo, &name, pack_data->hash, "idx");
if (finalize_object_file(curr_index_name, name.buf))
if (finalize_object_file(pack_data->repo, curr_index_name, name.buf))
die("cannot store index file");
free((void *)curr_index_name);
return strbuf_detach(&name, NULL);
Expand Down
16 changes: 9 additions & 7 deletions builtin/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ static void check_connectivity(void)
* and ignore any that weren't present in our earlier
* traversal.
*/
for_each_loose_object(mark_loose_unreachable_referents, NULL, 0);
for_each_loose_object(the_repository->objects,
mark_loose_unreachable_referents, NULL, 0);
for_each_packed_object(the_repository,
mark_packed_unreachable_referents,
NULL,
Expand Down Expand Up @@ -632,7 +633,7 @@ static int fsck_loose(const struct object_id *oid, const char *path,
oi.sizep = &size;
oi.typep = &type;

if (read_loose_object(path, oid, &real_oid, &contents, &oi) < 0) {
if (read_loose_object(the_repository, path, oid, &real_oid, &contents, &oi) < 0) {
if (contents && !oideq(&real_oid, oid))
err = error(_("%s: hash-path mismatch, found at: %s"),
oid_to_hex(&real_oid), path);
Expand Down Expand Up @@ -687,7 +688,7 @@ static int fsck_subdir(unsigned int nr, const char *path UNUSED, void *data)
return 0;
}

static void fsck_object_dir(const char *path)
static void fsck_source(struct odb_source *source)
{
struct progress *progress = NULL;
struct for_each_loose_cb cb_data = {
Expand All @@ -701,8 +702,8 @@ static void fsck_object_dir(const char *path)
progress = start_progress(the_repository,
_("Checking object directories"), 256);

for_each_loose_file_in_objdir(path, fsck_loose, fsck_cruft, fsck_subdir,
&cb_data);
for_each_loose_file_in_source(source, fsck_loose,
fsck_cruft, fsck_subdir, &cb_data);
display_progress(progress, 256);
stop_progress(&progress);
}
Expand Down Expand Up @@ -994,13 +995,14 @@ int cmd_fsck(int argc,
fsck_refs(the_repository);

if (connectivity_only) {
for_each_loose_object(mark_loose_for_connectivity, NULL, 0);
for_each_loose_object(the_repository->objects,
mark_loose_for_connectivity, NULL, 0);
for_each_packed_object(the_repository,
mark_packed_for_connectivity, NULL, 0);
} else {
odb_prepare_alternates(the_repository->objects);
for (source = the_repository->objects->sources; source; source = source->next)
fsck_object_dir(source->path);
fsck_source(source);

if (check_full) {
struct packed_git *p;
Expand Down
10 changes: 4 additions & 6 deletions builtin/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ static int loose_object_auto_condition(struct gc_config *cfg UNUSED)
if (loose_object_auto_limit < 0)
return 1;

return for_each_loose_file_in_objdir(the_repository->objects->sources->path,
return for_each_loose_file_in_source(the_repository->objects->sources,
loose_object_count,
NULL, NULL, &count);
}
Expand Down Expand Up @@ -1344,7 +1344,7 @@ static int pack_loose(struct maintenance_run_opts *opts)
* Do not start pack-objects process
* if there are no loose objects.
*/
if (!for_each_loose_file_in_objdir(r->objects->sources->path,
if (!for_each_loose_file_in_source(r->objects->sources,
bail_on_loose,
NULL, NULL, NULL))
return 0;
Expand Down Expand Up @@ -1384,11 +1384,9 @@ static int pack_loose(struct maintenance_run_opts *opts)
else if (data.batch_size > 0)
data.batch_size--; /* Decrease for equality on limit. */

for_each_loose_file_in_objdir(r->objects->sources->path,
for_each_loose_file_in_source(r->objects->sources,
write_loose_object_to_stdin,
NULL,
NULL,
&data);
NULL, NULL, &data);

fclose(data.in);

Expand Down
2 changes: 1 addition & 1 deletion builtin/index-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ static void rename_tmp_packfile(const char **final_name,
if (!*final_name || strcmp(*final_name, curr_name)) {
if (!*final_name)
*final_name = odb_pack_name(the_repository, name, hash, ext);
if (finalize_object_file(curr_name, *final_name))
if (finalize_object_file(the_repository, curr_name, *final_name))
die(_("unable to rename temporary '*.%s' file to '%s'"),
ext, *final_name);
} else if (make_read_only_if_same) {
Expand Down
3 changes: 2 additions & 1 deletion builtin/merge-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ int cmd_merge_file(int argc,
if (object_id && !to_stdout) {
struct object_id oid;
if (result.size) {
if (write_object_file(result.ptr, result.size, OBJ_BLOB, &oid) < 0)
if (odb_write_object(the_repository->objects, result.ptr,
result.size, OBJ_BLOB, &oid) < 0)
ret = error(_("Could not write object file"));
} else {
oidcpy(&oid, the_hash_algo->empty_blob);
Expand Down
2 changes: 1 addition & 1 deletion builtin/mktag.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int cmd_mktag(int argc,
if (verify_object_in_tag(&tagged_oid, &tagged_type) < 0)
die(_("tag on stdin did not refer to a valid object"));

if (write_object_file(buf.buf, buf.len, OBJ_TAG, &result) < 0)
if (odb_write_object(the_repository->objects, buf.buf, buf.len, OBJ_TAG, &result) < 0)
die(_("unable to write tag file"));

strbuf_release(&buf);
Expand Down
2 changes: 1 addition & 1 deletion builtin/mktree.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static void write_tree(struct object_id *oid)
strbuf_add(&buf, ent->oid.hash, the_hash_algo->rawsz);
}

write_object_file(buf.buf, buf.len, OBJ_TREE, oid);
odb_write_object(the_repository->objects, buf.buf, buf.len, OBJ_TREE, oid);
strbuf_release(&buf);
}

Expand Down
3 changes: 2 additions & 1 deletion builtin/notes.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ static void prepare_note_data(const struct object_id *object, struct note_data *

static void write_note_data(struct note_data *d, struct object_id *oid)
{
if (write_object_file(d->buf.buf, d->buf.len, OBJ_BLOB, oid)) {
if (odb_write_object(the_repository->objects, d->buf.buf,
d->buf.len, OBJ_BLOB, oid)) {
int status = die_message(_("unable to write note object"));

if (d->edit_path)
Expand Down
31 changes: 24 additions & 7 deletions builtin/pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ static void write_pack_file(void)
strbuf_setlen(&tmpname, tmpname_len);
}

rename_tmp_packfile_idx(&tmpname, &idx_tmp_name);
rename_tmp_packfile_idx(the_repository, &tmpname, &idx_tmp_name);

free(idx_tmp_name);
strbuf_release(&tmpname);
Expand Down Expand Up @@ -1709,8 +1709,16 @@ static int want_object_in_pack_mtime(const struct object_id *oid,
struct odb_source *source;
struct list_head *pos;

if (!exclude && local && has_loose_object_nonlocal(oid))
return 0;
if (!exclude && local) {
/*
* Note that we start iterating at `sources->next` so that we
* skip the local object source.
*/
struct odb_source *source = the_repository->objects->sources->next;
for (; source; source = source->next)
if (has_loose_object(source, oid))
return 0;
}

/*
* If we already know the pack object lives in, start checks from that
Expand Down Expand Up @@ -3966,7 +3974,14 @@ static void add_cruft_object_entry(const struct object_id *oid, enum object_type
} else {
if (!want_object_in_pack_mtime(oid, 0, &pack, &offset, mtime))
return;
if (!pack && type == OBJ_BLOB && !has_loose_object(oid)) {
if (!pack && type == OBJ_BLOB) {
struct odb_source *source = the_repository->objects->sources;
int found = 0;

for (; !found && source; source = source->next)
if (has_loose_object(source, oid))
found = 1;

/*
* If a traversed tree has a missing blob then we want
* to avoid adding that missing object to our pack.
Expand All @@ -3980,7 +3995,8 @@ static void add_cruft_object_entry(const struct object_id *oid, enum object_type
* limited to "ensure non-tip blobs which don't exist in
* packs do exist via loose objects". Confused?
*/
return;
if (!found)
return;
}

entry = create_object_entry(oid, type, pack_name_hash_fn(name),
Expand Down Expand Up @@ -4368,7 +4384,7 @@ static int add_loose_object(const struct object_id *oid, const char *path,
*/
static void add_unreachable_loose_objects(struct rev_info *revs)
{
for_each_loose_file_in_objdir(repo_get_object_directory(the_repository),
for_each_loose_file_in_source(the_repository->objects->sources,
add_loose_object, NULL, NULL, revs);
}

Expand Down Expand Up @@ -4437,7 +4453,8 @@ static void loosen_unused_packed_objects(void)
if (!packlist_find(&to_pack, &oid) &&
!has_sha1_pack_kept_or_nonlocal(&oid) &&
!loosened_object_can_be_discarded(&oid, p->mtime)) {
if (force_object_loose(&oid, p->mtime))
if (force_object_loose(the_repository->objects->sources,
&oid, p->mtime))
die(_("unable to force loose object"));
loosened_objects_nr++;
}
Expand Down
Loading
Loading