Skip to content

Rebase to v2.51.0-rc0 #5754

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 875 commits into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
875 commits
Select commit Hold shift + click to select a range
28d5e8d
compat/vcbuild: document preferred way to build in Visual Studio
dscho May 17, 2021
fb861d9
http: optionally send SSL client certificate
pascalmuller Jun 23, 2021
9e98231
ci: run `contrib/subtree` tests in CI builds
vdye Aug 5, 2021
203e1c8
CMake: default Visual Studio generator has changed
PhilipOakley Jul 1, 2021
0b92a21
.gitignore: add Visual Studio CMakeSetting.json file
PhilipOakley Apr 24, 2021
805477a
hash-object: demonstrate a >4GB/LLP64 problem
PhilipOakley Oct 31, 2021
e02da63
CMakeLists: add default "x64-windows" arch for Visual Studio
PhilipOakley Apr 22, 2021
030d36f
object-file.c: use size_t for header lengths
PhilipOakley Nov 12, 2021
ae6ea2a
CMake: show Win32 and Generator_platform build-option values
PhilipOakley May 10, 2021
d443765
init: do parse _all_ core.* settings early
dscho Sep 8, 2021
620334e
hash algorithms: use size_t for section lengths
PhilipOakley Nov 12, 2021
29eab64
hash-object --stdin: verify that it works with >4GB/LLP64
PhilipOakley Dec 6, 2021
e30097f
hash-object: add another >4GB/LLP64 test case
PhilipOakley Dec 6, 2021
2346fd2
setup: properly use "%(prefix)/" when in WSL
derrickstolee Apr 13, 2022
9a99608
hash-object: add a >4GB/LLP64 test case using filtered input
PhilipOakley Dec 7, 2021
dca075d
compat/mingw.c: do not warn when failing to get owner
derrickstolee Apr 13, 2022
0ef69ea
mingw: $env:TERM="xterm-256color" for newer OSes
rkitover Apr 12, 2022
9b6963f
winansi: check result and Buffer before using Name
1480c1 May 28, 2022
bbf9cef
Add config option `windows.appendAtomically`
sunzhuoshi Jan 15, 2022
885961f
mingw: change core.fsyncObjectFiles = 1 by default
dscho Sep 4, 2017
e50713f
MinGW: link as terminal server aware
rimrul Jul 10, 2022
1fe7b1e
Fix Windows version resources
Mortein Nov 2, 2022
993df37
http: optionally load libcurl lazily
dscho May 6, 2023
490aad0
http: support lazy-loading libcurl also on Windows
dscho May 7, 2023
8f6b813
http: when loading libcurl lazily, allow for multiple SSL backends
dscho May 7, 2023
92c5388
status: fix for old-style submodules with commondir
sceptical-coder Oct 28, 2022
7d5553a
windows: skip linking `git-<command>` for built-ins
dscho Jan 27, 2023
9e3138e
mingw: do load libcurl dynamically by default
dscho May 7, 2023
f0b2c68
Add a GitHub workflow to verify that Git/Scalar work in Nano Server
dscho Nov 2, 2022
b364498
mingw: suggest `windows.appendAtomically` in more cases
dsl101 Jul 28, 2023
8ab7f74
win32: use native ANSI sequence processing, if possible
dscho Nov 22, 2023
a055f97
git.rc: include winuser.h
rimrul Dec 2, 2023
6eb8d9d
common-main.c: fflush stdout buffer upon exit
chengzhuo5 Apr 8, 2024
0597a34
t5601/t7406(mingw): do run tests with symlink support
dscho Apr 9, 2024
6721adb
win32: ensure that `localtime_r()` is declared even in i686 builds
dscho May 21, 2024
021ef4f
Fallback to AppData if XDG_CONFIG_HOME is unset
ariellourenco Jul 2, 2024
a833e6c
run-command: be helpful with Git LFS fails on Windows 7
dscho Jul 4, 2024
4dfa5bf
ci: work around a problem with HTTP/2 vs libcurl v8.10.0
dscho Sep 24, 2024
17633b6
survey: stub in new experimental 'git-survey' command
Apr 29, 2024
6450ab8
survey: add command line opts to select references
Apr 29, 2024
bcaf0e9
survey: start pretty printing data in table form
derrickstolee Sep 1, 2024
b514ed6
survey: add object count summary
derrickstolee Sep 2, 2024
298c2b9
survey: summarize total sizes by object type
derrickstolee Sep 2, 2024
6aeb4e4
revision: create mark_trees_uninteresting_dense()
derrickstolee Sep 6, 2024
488a23b
survey: show progress during object walk
derrickstolee Sep 2, 2024
3008f23
survey: add ability to track prioritized lists
derrickstolee Sep 2, 2024
a0e3de1
survey: add report of "largest" paths
derrickstolee Sep 2, 2024
2667dd8
mingw: make sure `errno` is set correctly when socket operations fail
dscho Nov 14, 2019
7cbab3d
survey: add --top=<N> option and config
derrickstolee Sep 23, 2024
8623f70
compat/mingw: handle WSA errors in strerror
rimrul Dec 22, 2024
051189f
survey: clearly note the experimental nature in the output
dscho Jul 1, 2024
c48e3aa
compat/mingw: drop outdated comment
rimrul Dec 22, 2024
2e0afaf
t0301: actually test credential-cache on Windows
rimrul Dec 29, 2024
5806284
credential-cache: handle ECONNREFUSED gracefully
rimrul Dec 22, 2024
5701a08
max_tree_depth: lower it for clangarm64 on Windows
dscho Apr 15, 2025
e167aed
reftable: do make sure to use custom allocators
dscho Mar 6, 2025
d600907
check-whitespace: avoid alerts about upstream commits
dscho Jun 3, 2025
1fe7e7b
refs: forbid clang to complain about unreachable code
dscho Jun 4, 2025
f27ee94
Merge branch 'reftable-vs-cmake'
dscho Aug 3, 2025
bde73a3
Merge branch 'organize-mingw-includes'
dscho Jun 2, 2025
7cdef18
Merge 'remote-hg-prerequisites' into HEAD
dscho Jun 8, 2018
bab9580
mingw: avoid the comma operator
dscho Jun 5, 2025
74b69a3
Merge branch 'drive-prefix'
dscho Jun 8, 2018
98997eb
Merge branch 'dont-clean-junctions'
dscho Jul 30, 2019
614ce33
Merge branch 'msys2-python'
dscho May 31, 2019
4dec238
Merge branch 'mimalloc-v2.2.3'
dscho Sep 8, 2022
041825d
Merge pull request #2375 from assarbad/reintroduce-sideband-config
dscho Oct 30, 2019
a5938b3
Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
dscho Jan 3, 2020
461267d
Merge pull request #2488 from bmueller84/master
dscho Jan 22, 2020
eb60942
Merge pull request #2501 from jeffhostetler/clink-debug-curl
dscho Jan 30, 2020
f7c1cda
Merge pull request #2504 from dscho/access-repo-via-junction
dscho Feb 1, 2020
0994e3a
Merge pull request #2506 from dscho/issue-2283
dscho Feb 11, 2020
0454113
Merge pull request #2535 from dscho/schannel-revoke-best-effort
dscho Mar 4, 2020
f74802e
Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
dscho May 9, 2020
0590ee7
Merge 'add-p-many-files'
dscho Jun 8, 2018
97ad2e3
Merge pull request #2714 from lbonanomi/crlf-scissors
dscho Jul 3, 2020
83fe4f0
Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
dscho Oct 9, 2020
aeafacd
Merge 'git-gui/js/intent-to-add'
dscho Oct 18, 2020
b7d5d12
Merge pull request #2974 from derrickstolee/maintenance-and-headless
dscho Jan 11, 2021
35e3161
cmake: install headless-git. (#4338)
dscho Mar 13, 2023
12810dd
Merge pull request #2351 from PhilipOakley/vcpkg-tip
dscho Oct 7, 2019
4358ec6
Merge pull request #2915 from dennisameling/windows-arm64-support
dscho Dec 9, 2020
15fa9db
Merge pull request #3327 from dennisameling/fix-host-cpu
dscho Jul 19, 2021
282f2c7
Merge pull request #3165 from dscho/increase-allowed-length-of-interp…
dscho Apr 3, 2021
1577615
Merge pull request #3220 from dscho/there-is-no-vs/master-anymore
dscho May 17, 2021
e2cc57d
Merge pull request #3293 from pascalmuller/http-support-automatically…
dscho Jun 24, 2021
cb422f4
Merge pull request #3349 from vdye/feature/ci-subtree-tests
dscho Aug 10, 2021
6c03634
Merge pull request #3306 from PhilipOakley/vs-sln
dscho Oct 12, 2021
5dd93c1
Merge pull request #3417 from dscho/initialize-core.symlinks-earlier
dscho Oct 13, 2021
83d277d
Merge pull request #3533 from PhilipOakley/hashliteral_t
dscho Dec 15, 2021
9a5a3d8
Merge pull request #3791: Various fixes around `safe.directory`
derrickstolee Apr 13, 2022
ba11ef5
Merge pull request #3751 from rkitover/native-term
dscho Apr 21, 2022
1d5998c
Merge pull request #3875 from 1480c1/wine/detect_msys_tty
dscho May 30, 2022
e7c2851
Merge branch 'optionally-dont-append-atomically-on-windows'
dscho Jun 23, 2022
d5f39cd
Merge branch 'fsync-object-files-always'
dscho Oct 11, 2018
ec81133
Merge pull request #3942 from rimrul/mingw-tsaware
dscho Jul 27, 2022
54e3088
Fix Windows version resources (#4092)
dscho Nov 3, 2022
0a1f87f
Fix global repository field not being cleared (#4083)
dscho Dec 20, 2022
48f2f90
Skip linking the "dashed" `git-<command>`s for built-ins (#4252)
dscho Jan 31, 2023
1433dd5
Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl (…
dscho May 15, 2023
cd032a4
Merge branch 'nano-server'
dscho Aug 7, 2023
164d720
Additional error checks for issuing the windows.appendAtomically warn…
dscho Aug 7, 2023
1111e6a
win32: use native ANSI sequence processing, if possible (#4700)
dscho Dec 2, 2023
49374a3
ARM64: Embed manifest properly (#4718)
dscho Dec 7, 2023
c8802dd
common-main.c: fflush stdout buffer when exit (#4901)
dscho Apr 12, 2024
72eac35
Merge branch 'run-t5601-and-t7406-with-symlinks-on-windows-10'
dscho Jul 12, 2024
02a0033
Merge branch 'Fix-i686-build-with-GCC-v14'
dscho Jul 12, 2024
37cba92
Merge branch 'Fallback-to-AppData-if-XDG-CONFIG-HOME-is-unset'
dscho Jul 12, 2024
e82af4e
Merge branch 'run-command-be-helpful-when-Git-LFS-fails-on-Windows-7'
dscho Jul 12, 2024
8a3f8c5
pack-objects: create new name-hash algorithm (#5157)
dscho Sep 24, 2024
16ba781
Add path walk API and its use in 'git pack-objects' (#5171)
derrickstolee Sep 25, 2024
445c378
Add experimental 'git survey' builtin (#5174)
dscho Sep 26, 2024
f15f6f3
credential-cache: handle ECONNREFUSED gracefully (#5329)
dscho Jan 1, 2025
c509040
clangarm64: let the tests pass! (#5586)
dscho Apr 21, 2025
162c8aa
Merge branch 'reftable-vs-custom-allocators'
dscho Jun 2, 2025
c06fb9f
Merge branch 'check-whitespace-only-downstream'
dscho Jun 3, 2025
4e43ad4
Merge branch 'refs-clang-fix'
dscho Jun 11, 2025
3270169
mingw: avoid the comma operator (#5660)
dscho Jun 5, 2025
48fe1ae
Merge branch 'ready-for-upstream'
dscho Oct 11, 2018
32781f0
Win32: make FILETIME conversion functions public
kblees Jul 6, 2013
658021a
Win32: dirent.c: Move opendir down
kblees Sep 8, 2013
e2fb7cf
mingw: make the dirent implementation pluggable
kblees Sep 8, 2013
81fe5aa
Win32: make the lstat implementation pluggable
kblees Sep 8, 2013
9d84848
mingw: add infrastructure for read-only file system level caches
kblees Sep 8, 2013
9e28632
mingw: add a cache below mingw's lstat and dirent implementations
kblees Oct 1, 2013
920ade8
fscache: load directories only once
kblees Jun 24, 2014
d3ca2d0
fscache: add key for GIT_TRACE_FSCACHE
jeffhostetler Jan 24, 2017
34da809
fscache: remember not-found directories
jeffhostetler Dec 13, 2016
91814ed
fscache: add a test for the dir-not-found optimization
dscho Jan 25, 2017
4f5e770
add: use preload-index and fscache for performance
jeffhostetler Nov 22, 2016
99c3cf7
dir.c: make add_excludes aware of fscache during status
jeffhostetler Nov 1, 2017
0482c6c
fscache: make fscache_enabled() public
jeffhostetler Dec 20, 2017
3a7354d
dir.c: regression fix for add_excludes with fscache
jeffhostetler Dec 20, 2017
91ae583
fetch-pack.c: enable fscache for stats under .git/objects
Nov 22, 2017
889a154
checkout.c: enable fscache for checkout again
Jan 30, 2018
6dbfccd
Enable the filesystem cache (fscache) in refresh_index().
benpeart Sep 7, 2018
1d0b3c2
fscache: use FindFirstFileExW to avoid retrieving the short name
benpeart Oct 23, 2018
e857619
fscache: add GIT_TEST_FSCACHE support
benpeart Oct 4, 2018
f00c46f
fscache: add fscache hit statistics
benpeart Sep 25, 2018
f57a68a
unpack-trees: enable fscache for sparse-checkout
derrickstolee Jun 12, 2019
53b6481
status: disable and free fscache at the end of the status command
benpeart Nov 1, 2018
9c00d44
mem_pool: add GIT_TRACE_MEMPOOL support
benpeart Oct 4, 2018
cef44a1
fscache: fscache takes an initial size
benpeart Nov 2, 2018
79142b6
fscache: update fscache to be thread specific instead of global
benpeart Oct 4, 2018
39bc97b
fscache: teach fscache to use mempool
benpeart Nov 2, 2018
b778cbd
fscache: make fscache_enable() thread safe
benpeart Nov 16, 2018
173791b
fscache: remember the reparse tag for each entry
dscho Dec 11, 2018
d98d36f
fscache: teach fscache to use NtQueryDirectoryFile
benpeart Nov 15, 2018
9ec98e0
Merge branch 'fscache'
dscho Nov 15, 2018
41d719e
fscache: implement an FSCache-aware is_mount_point()
dscho Dec 11, 2018
2e60940
Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
dscho Nov 5, 2018
4b61fbb
clean: make use of FSCache
dscho Dec 11, 2018
c5150aa
Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
dscho Nov 16, 2018
6891d09
Merge branch 'dont-clean-junctions-fscache'
dscho Jul 23, 2019
83d585b
pack-objects (mingw): demonstrate a segmentation fault with large deltas
vangdfang Jan 9, 2014
e8a97e1
mingw: support long paths
kblees Jul 28, 2015
c268012
Win32: fix 'lstat("dir/")' with long paths
kblees Jul 4, 2014
f3d8d9d
win32(long path support): leave drive-less absolute paths intact
dscho Sep 6, 2023
aca557b
mingw: Support `git_terminal_prompt` with more terminals
kblees Mar 19, 2015
ddd0140
compat/fsmonitor/fsm-*-win32: support long paths
jeffhostetler Mar 25, 2022
a0f2c10
compat/terminal.c: only use the Windows console if bash 'read -r' fails
kblees May 9, 2015
5febed5
clean: suggest using `core.longPaths` if paths are too long to remove
mathstuf Apr 22, 2022
e66d09d
mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
dscho Feb 23, 2018
4301ab9
strbuf_readlink: don't call readlink twice if hint is the exact link …
kblees May 11, 2015
8e6069d
strbuf_readlink: support link targets that exceed PATH_MAX
kblees May 11, 2015
d34bdf5
lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
kblees May 11, 2015
6902d9c
Win32: don't call GetFileAttributes twice in mingw_lstat()
kblees May 12, 2015
0f62b56
Win32: implement stat() with symlink support
kblees May 15, 2015
c7c8406
Win32: remove separate do_lstat() function
kblees May 11, 2015
e1c1cf9
Win32: let mingw_lstat() error early upon problems with reparse points
kblees May 23, 2015
0c95fce
mingw: teach fscache and dirent about symlinks
kblees Jan 10, 2017
36a1a08
Win32: lstat(): return adequate stat.st_size for symlinks
kblees May 15, 2015
87e456e
Win32: factor out retry logic
kblees May 19, 2015
f6f6013
Win32: change default of 'core.symlinks' to false
kblees May 23, 2015
e108226
Win32: add symlink-specific error codes
kblees May 15, 2015
cc9d318
Win32: mingw_unlink: support symlinks to directories
kblees May 23, 2015
2b2052c
Win32: mingw_rename: support renaming symlinks
kblees May 19, 2015
ecf35f7
Win32: mingw_chdir: change to symlink-resolved directory
kblees May 23, 2015
ab65cc1
Win32: implement readlink()
kblees May 23, 2015
ae05423
mingw: lstat: compute correct size for symlinks
billziss-gh May 28, 2020
f65fe79
Win32: implement basic symlink() functionality (file symlinks only)
kblees May 23, 2015
f0a2df2
Win32: symlink: add support for symlinks to directories
kblees May 23, 2015
9630aff
mingw: introduce code to detect whether we're inside a Windows container
ZCube Apr 23, 2018
7d5aa2c
mingw: try to create symlinks without elevated permissions
dscho May 30, 2017
558e8d3
mingw: when running in a Windows container, try to rename() harder
ZCube Apr 23, 2018
4a5a4e6
mingw: emulate stat() a little more faithfully
dscho Mar 2, 2020
73eee36
mingw: move the file_attr_to_st_mode() function definition
ZCube Apr 23, 2018
557de2c
mingw: special-case index entries for symlinks with buggy size
dscho Jun 4, 2020
b2195fe
Win32: symlink: move phantom symlink creation to a separate function
piscisaureus Oct 26, 2018
4c97a22
Introduce helper to create symlinks that knows about index_state
dscho Feb 11, 2019
95a6b3e
mingw: allow to specify the symlink type in .gitattributes
piscisaureus Oct 26, 2018
71bd8db
mingw: Windows Docker volumes are *not* symbolic links
dscho Apr 23, 2018
f4b1593
mingw: work around rename() failing on a read-only file
dsl101 Jul 28, 2023
0d561e2
Win32: symlink: add test for `symlink` attribute
piscisaureus Oct 26, 2018
5b85b10
mingw: explicitly specify with which cmd to prefix the cmdline
dscho Jul 20, 2017
8c2c1b2
mingw: when path_lookup() failed, try BusyBox
dscho Jul 20, 2017
14a3fac
test-tool: learn to act as a drop-in replacement for `iconv`
dscho Jul 20, 2017
a64ed92
tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
dscho Jul 20, 2017
4ae899c
gitattributes: mark .png files as binary
dscho Oct 11, 2018
70f16f9
tests: move test PNGs into t/lib-diff/
dscho Aug 5, 2017
40ca90c
tests: only override sort & find if there are usable ones in /usr/bin/
dscho Jul 17, 2017
774fcce
tests: use the correct path separator with BusyBox
dscho Nov 19, 2018
996207a
mingw: only use Bash-ism `builtin pwd -W` when available
dscho Jun 29, 2017
2a0e67e
tests (mingw): remove Bash-specific pwd option
dscho Jun 30, 2017
7c288b0
test-lib: add BUSYBOX prerequisite
dscho Jul 19, 2017
260c0ff
t5003: use binary file from t/lib-diff/
dscho Aug 5, 2017
e113764
t5532: workaround for BusyBox on Windows
dscho Jul 21, 2017
0aa803e
t5605: special-case hardlink test for BusyBox-w32
dscho Jul 21, 2017
5140c21
t5813: allow for $PWD to be a Windows path
dscho Jul 5, 2017
f7f00c8
t9200: skip tests when $PWD contains a colon
dscho Jul 7, 2017
a81f1ff
mingw: add a Makefile target to copy test artifacts
dscho Jul 19, 2017
67ff85f
mingw: kill child processes in a gentler way
dscho May 17, 2017
41fa8d0
mingw: optionally enable wsl compability file mode bits
swigger Jun 7, 2023
b4fd14a
mingw: really handle SIGINT
dscho Apr 22, 2018
cedebf9
mingw: do not call xutftowcs_path in mingw_mktemp
neerajsi-msft Oct 27, 2021
54c8833
Partially un-revert "editor: save and reset terminal after calling ED…
dscho Nov 25, 2021
61f6d9a
reset: reinstate support for the deprecated --stdin option
dscho Dec 10, 2019
18fa3df
Describe Git for Windows' architecture [no ci]
dscho Feb 13, 2023
7aa1102
Modify the Code of Conduct for Git for Windows
dscho Oct 11, 2019
ea7e41b
CONTRIBUTING.md: add guide for first-time contributors
derrickstolee Mar 1, 2018
3b88e18
README.md: Add a Windows-specific preamble
dscho Jan 10, 2014
b7e84e6
Add an issue template
shiftkey Feb 18, 2016
05f29f4
Add a GitHub workflow to monitor component updates
dscho Sep 29, 2020
bf333f2
Modify the GitHub Pull Request template (to reflect Git for Windows)
Dec 22, 2017
64cf5da
fsmonitor: reintroduce core.useBuiltinFSMonitor
vdye Apr 4, 2022
de2e700
dependabot: help keeping GitHub Actions versions up to date
dscho Feb 6, 2024
92da824
SECURITY.md: document Git for Windows' policies
dscho Aug 23, 2019
4470b5a
git-gui: provide question helper for retry fallback on Windows
hvoigt Feb 21, 2010
ffe9ebd
git-gui--askyesno: fix funny text wrapping
dscho Sep 20, 2017
34b30e1
git-gui--askyesno: allow overriding the window title
dscho Sep 20, 2017
ab11df9
git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
dscho Jul 23, 2010
e5be966
git-gui--askyesno (mingw): use Git for Windows' icon, if available
dscho Sep 20, 2017
da514a5
Merge 'git-gui' into HEAD
dscho Jun 7, 2018
1cde670
Merge branch 'git-gui-askyesno'
dscho Jun 8, 2018
b0d6a45
Merge branch 'gitk-and-git-gui-patches'
dscho Oct 11, 2018
ccff96d
Merge branch 'long-paths'
dscho Nov 15, 2018
a1e9ddf
Merge branch 'msys2'
dscho Nov 15, 2018
d1b2754
Merge branch 'kblees/kb/symlinks'
dscho Nov 15, 2018
6aa9159
Merge 'docker-volumes-are-no-symlinks'
dscho Oct 12, 2018
7a4fdb4
mingw: try resetting the read-only bit if rename fails (#4527)
dscho Aug 7, 2023
d28f198
Merge pull request #1897 from piscisaureus/symlink-attr
dscho Oct 31, 2018
18835a7
Merge branch 'busybox-w32'
dscho Feb 7, 2019
7c2c5f9
Merge branch 'wsl-file-mode-bits'
dscho Aug 7, 2023
abf5a4e
Merge pull request #1170 from dscho/mingw-kill-process
dscho Oct 11, 2018
5ad43c0
Merge pull request #3492 from dscho/ns/batched-fsync
vdye Oct 28, 2021
c658d9a
Merge branch 'un-revert-editor-save-and-reset'
dscho Jan 15, 2022
cc18b99
Merge branch 'phase-out-reset-stdin'
dscho Jun 8, 2018
96740fc
Merge branch 'deprecate-core.useBuiltinFSMonitor'
dscho Jan 24, 2023
607f9be
Merge pull request #2837 from dscho/monitor-component-updates
dscho Oct 7, 2020
1c2e825
Merge 'readme' into HEAD
dscho Jun 7, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ freebsd_task:
env:
GIT_PROVE_OPTS: "--timer --jobs 10"
GIT_TEST_OPTS: "--no-chain-lint --no-bin-wrappers"
MAKEFLAGS: "-j4"
GIT_SKIP_TESTS: t7815.12
MAKEFLAGS: -j4
DEFAULT_TEST_TARGET: prove
DEFAULT_UNIT_TEST_TARGET: unit-tests-prove
DEVELOPER: 1
freebsd_instance:
image_family: freebsd-13-4
image_family: freebsd-14-3
memory: 2G
install_script:
pkg install -y gettext gmake perl5
Expand All @@ -19,4 +21,4 @@ freebsd_task:
build_script:
- su git -c gmake
test_script:
- su git -c 'gmake DEFAULT_UNIT_TEST_TARGET=unit-tests-prove test unit-tests'
- su git -c 'gmake test unit-tests'
27 changes: 15 additions & 12 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ UseTab: Always
TabWidth: 8
IndentWidth: 8
ContinuationIndentWidth: 8
ColumnLimit: 80

# While we do want to enforce a character limit of 80 characters, we often
# allow lines to overflow that limit to prioritize readability. Setting a
# character limit here with penalties has been finicky and creates too many
# false positives.
#
# NEEDSWORK: It would be nice if we can find optimal settings to ensure we
# can re-enable the limit here.
ColumnLimit: 0

# C Language specifics
Language: Cpp
Expand Down Expand Up @@ -210,16 +218,11 @@ MaxEmptyLinesToKeep: 1
# No empty line at the start of a block.
KeepEmptyLinesAtTheStartOfBlocks: false

# Penalties
# This decides what order things should be done if a line is too long
PenaltyBreakAssignment: 5
PenaltyBreakBeforeFirstCallParameter: 5
PenaltyBreakComment: 5
PenaltyBreakFirstLessLess: 0
PenaltyBreakOpenParenthesis: 300
PenaltyBreakString: 5
PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 300

# Don't sort #include's
SortIncludes: false

# Remove optional braces of control statements (if, else, for, and while)
# according to the LLVM coding style. This avoids braces on simple
# single-statement bodies of statements but keeps braces if one side of
# if/else if/.../else cascade has multi-statement body.
RemoveBracesLLVM: true
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ jobs:
path: build
- name: Test
shell: pwsh
run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }
run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"

regular:
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ test:msvc-meson:
- job: "build:msvc-meson"
artifacts: true
script:
- meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
parallel: 10

test:fuzz-smoke-tests:
Expand Down
55 changes: 55 additions & 0 deletions Documentation/BreakingChanges.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,53 @@ Cf. <[email protected]>,
<[email protected]>,
<CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>.

* The default storage format for references in newly created repositories will
be changed from "files" to "reftable". The "reftable" format provides
multiple advantages over the "files" format:
+
** It is impossible to store two references that only differ in casing on
case-insensitive filesystems with the "files" format. This issue is common
on Windows and macOS platforms. As the "reftable" backend does not use
filesystem paths to encode reference names this problem goes away.
** Similarly, macOS normalizes path names that contain unicode characters,
which has the consequence that you cannot store two names with unicode
characters that are encoded differently with the "files" backend. Again,
this is not an issue with the "reftable" backend.
** Deleting references with the "files" backend requires Git to rewrite the
complete "packed-refs" file. In large repositories with many references
this file can easily be dozens of megabytes in size, in extreme cases it
may be gigabytes. The "reftable" backend uses tombstone markers for
deleted references and thus does not have to rewrite all of its data.
** Repository housekeeping with the "files" backend typically performs
all-into-one repacks of references. This can be quite expensive, and
consequently housekeeping is a tradeoff between the number of loose
references that accumulate and slow down operations that read references,
and compressing those loose references into the "packed-refs" file. The
"reftable" backend uses geometric compaction after every write, which
amortizes costs and ensures that the backend is always in a
well-maintained state.
** Operations that write multiple references at once are not atomic with the
"files" backend. Consequently, Git may see in-between states when it reads
references while a reference transaction is in the process of being
committed to disk.
** Writing many references at once is slow with the "files" backend because
every reference is created as a separate file. The "reftable" backend
significantly outperforms the "files" backend by multiple orders of
magnitude.
** The reftable backend uses a binary format with prefix compression for
reference names. As a result, the format uses less space compared to the
"packed-refs" file.
+
Users that get immediate benefit from the "reftable" backend could continue to
opt-in to the "reftable" format manually by setting the "init.defaultRefFormat"
config. But defaults matter, and we think that overall users will have a better
experience with less platform-specific quirks when they use the new backend by
default.
+
A prerequisite for this change is that the ecosystem is ready to support the
"reftable" format. Most importantly, alternative implementations of Git like
JGit, libgit2 and Gitoxide need to support it.

=== Removals

* Support for grafting commits has long been superseded by git-replace(1).
Expand Down Expand Up @@ -183,6 +230,14 @@ These features will be removed.
timeframe, in preference to its synonym "--annotate-stdin". Git 3.0
removes the support for "--stdin" altogether.

* The git-whatchanged(1) command has outlived its usefulness more than
10 years ago, and takes more keystrokes to type than its rough
equivalent `git log --raw`. We have nominated the command for
removal, have changed the command to refuse to work unless the
`--i-still-use-this` option is given, and asked the users to report
when they do so. So far there hasn't been a single complaint.
+
The command will be removed.

== Superseded features that will not be deprecated

Expand Down
30 changes: 28 additions & 2 deletions Documentation/CodingGuidelines
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,17 @@ For C programs:
. since late 2021 with 44ba10d6, we have had variables declared in
the for loop "for (int i = 0; i < 10; i++)".

. since late 2023 with 8277dbe987 we have been using the bool type
from <stdbool.h>.

C99 features we have test balloons for:

. since late 2024 with v2.48.0-rc0~20, we have test balloons for
compound literal syntax, e.g., (struct foo){ .member = value };
our hope is that no platforms we care about have trouble using
them, and officially adopt its wider use in mid 2026. Do not add
more use of the syntax until that happens.

New C99 features that we cannot use yet:

. %z and %zu as a printf() argument for a size_t (the %z being for
Expand All @@ -315,6 +326,9 @@ For C programs:
encouraged to have a blank line between the end of the declarations
and the first statement in the block.

- Do not explicitly initialize global variables to 0 or NULL;
instead, let BSS take care of the zero initialization.

- NULL pointers shall be written as NULL, not as 0.

- When declaring pointers, the star sides with the variable
Expand Down Expand Up @@ -610,8 +624,9 @@ For C programs:
- `S_init()` initializes a structure without allocating the
structure itself.

- `S_release()` releases a structure's contents without freeing the
structure.
- `S_release()` releases a structure's contents without reinitializing
the structure for immediate reuse, and without freeing the structure
itself.

- `S_clear()` is equivalent to `S_release()` followed by `S_init()`
such that the structure is directly usable after clearing it. When
Expand Down Expand Up @@ -877,6 +892,17 @@ Characters are also surrounded by underscores:
As a side effect, backquoted placeholders are correctly typeset, but
this style is not recommended.

When documenting multiple related `git config` variables, place them on
a separate line instead of separating them by commas. For example, do
not write this:
`core.var1`, `core.var2`::
Description common to `core.var1` and `core.var2`.

Instead write this:
`core.var1`::
`core.var2`::
Description common to `core.var1` and `core.var2`.

Synopsis Syntax

The synopsis (a paragraph with [synopsis] attribute) is automatically
Expand Down
7 changes: 6 additions & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,12 @@ lint-docs-meson:
awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
grep -v -e '#' -e '^$$' | \
sort >tmp-meson-diff/meson.adoc && \
ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
ls git*.adoc scalar.adoc | \
grep -v -e git-bisect-lk2009.adoc \
-e git-pack-redundant.adoc \
-e git-tools.adoc \
-e git-whatchanged.adoc \
>tmp-meson-diff/actual.adoc && \
if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
echo "Meson man pages differ from actual man pages:"; \
diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \
Expand Down
39 changes: 26 additions & 13 deletions Documentation/MyFirstObjectWalk.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:
#include "builtin.h"
#include "trace.h"

int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
trace_printf(_("cmd_walken incoming...\n"));
return 0;
Expand Down Expand Up @@ -83,23 +83,36 @@ int cmd_walken(int argc, const char **argv, const char *prefix)
}
----

Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:
Also add the relevant line in `builtin.h` near `cmd_version()`:

----
int cmd_walken(int argc, const char **argv, const char *prefix);
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);
----

Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,
Include the command in `git.c` in `commands[]` near the entry for `version`,
maintaining alphabetical ordering:

----
{ "walken", cmd_walken, RUN_SETUP },
----

Add it to the `Makefile` near the line for `builtin/worktree.o`:
Add an entry for the new command in the both the Make and Meson build system,
before the entry for `worktree`:

- In the `Makefile`:
----
...
BUILTIN_OBJS += builtin/walken.o
...
----

- In the `meson.build` file:
----
builtin_sources = [
...
'builtin/walken.c',
...
]
----

Build and test out your command, without forgetting to ensure the `DEVELOPER`
Expand Down Expand Up @@ -193,7 +206,7 @@ initialization functions.

Next, we should have a look at any relevant configuration settings (i.e.,
settings readable and settable from `git config`). This is done by providing a
callback to `git_config()`; within that callback, you can also invoke methods
callback to `repo_config()`; within that callback, you can also invoke methods
from other components you may need that need to intercept these options. Your
callback will be invoked once per each configuration value which Git knows about
(global, local, worktree, etc.).
Expand Down Expand Up @@ -221,14 +234,14 @@ static int git_walken_config(const char *var, const char *value,
}
----

Make sure to invoke `git_config()` with it in your `cmd_walken()`:
Make sure to invoke `repo_config()` with it in your `cmd_walken()`:

----
int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
...

git_config(git_walken_config, NULL);
repo_config(repo, git_walken_config, NULL);

...
}
Expand All @@ -250,14 +263,14 @@ We'll also need to include the `revision.h` header:

...

int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
/* This can go wherever you like in your declarations.*/
struct rev_info rev;
...

/* This should go after the git_config() call. */
repo_init_revisions(the_repository, &rev, prefix);
/* This should go after the repo_config() call. */
repo_init_revisions(repo, &rev, prefix);

...
}
Expand Down Expand Up @@ -305,7 +318,7 @@ Then let's invoke `final_rev_info_setup()` after the call to
`repo_init_revisions()`:

----
int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
...

Expand Down
Loading
Loading