Skip to content
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

Rebase to v2.44.0-rc1 #4816

Merged
merged 405 commits into from
Feb 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
405 commits
Select commit Hold shift + click to select a range
3353257
hash-object --stdin: verify that it works with >4GB/LLP64
PhilipOakley Dec 6, 2021
1edb627
hash-object: add another >4GB/LLP64 test case
PhilipOakley Dec 6, 2021
407d577
setup: properly use "%(prefix)/" when in WSL
derrickstolee Apr 13, 2022
e5bcb59
hash-object: add a >4GB/LLP64 test case using filtered input
PhilipOakley Dec 7, 2021
122b221
compat/mingw.c: do not warn when failing to get owner
derrickstolee Apr 13, 2022
80220c7
mingw: $env:TERM="xterm-256color" for newer OSes
rkitover Apr 12, 2022
becda22
winansi: check result and Buffer before using Name
1480c1 May 28, 2022
e966001
Add config option `windows.appendAtomically`
sunzhuoshi Jan 15, 2022
3751282
mingw: change core.fsyncObjectFiles = 1 by default
dscho Sep 4, 2017
dae381f
vcxproj: allow building with `NO_PERL` again
dscho Mar 29, 2022
16b0f2b
vcxproj: require C11
dscho Jun 28, 2022
e143213
vcxproj: ignore the `-pedantic` option
dscho Jun 28, 2022
aec6131
vcxproj: include reftable when committing `.vcxproj` files
dscho Jun 28, 2022
d4ee719
vcxproj: handle libreftable_test, too
dscho Jun 28, 2022
46bf8d4
vcxproj: avoid escaping double quotes in the defines
dscho Jun 28, 2022
a87c891
ci: adjust Azure Pipeline for `runs_on_pool`
dscho Jul 9, 2022
e601a63
ci: stop linking the `prove` cache
dscho Jul 9, 2022
8950ff3
ci: reinstate Azure Pipelines support
dscho Feb 11, 2021
c6f2362
azure-pipeline: drop the `GETTEXT_POISON` job
dscho Mar 29, 2022
21036e5
azure-pipeline: stop hard-coding `apt-get` calls
dscho Mar 29, 2022
2ee6500
azure-pipeline: drop the code to write to/read from a file share
dscho Jul 9, 2022
de3fc61
azure-pipeline: use partial clone/parallel checkout to initialize min…
dscho Jul 9, 2022
c4a2691
azure-pipeline: downcase the job name of the `Linux32` job
dscho Jul 9, 2022
398e99b
azure-pipeline: run static-analysis on jammy
ttaylorr Feb 8, 2021
1977b0d
MinGW: link as terminal server aware
rimrul Jul 10, 2022
793a4aa
Fix Windows version resources
Mortein Nov 2, 2022
e570cb6
bswap.h: add support for built-in bswap functions
dennisameling Oct 4, 2022
d5a0c15
config.mak.uname: add support for clangarm64
dennisameling Oct 4, 2022
456b684
http: optionally load libcurl lazily
dscho May 6, 2023
38db021
ci: create clangarm64-build.yml
dennisameling Oct 4, 2022
1a15f97
status: fix for old-style submodules with commondir
sceptical-coder Oct 28, 2022
a7f5766
windows: skip linking `git-<command>` for built-ins
dscho Jan 27, 2023
a0a0f81
windows: fix Repository>Explore Working Copy
dscho Mar 21, 2023
afdf1c3
http: support lazy-loading libcurl also on Windows
dscho May 7, 2023
db80eab
http: when loading libcurl lazily, allow for multiple SSL backends
dscho May 7, 2023
a6c0451
mingw: do load libcurl dynamically by default
dscho May 7, 2023
653444f
Add a GitHub workflow to verify that Git/Scalar work in Nano Server
dscho Nov 2, 2022
598d670
mingw: suggest `windows.appendAtomically` in more cases
dsl101 Jul 28, 2023
87137c3
win32: use native ANSI sequence processing, if possible
dscho Nov 22, 2023
9bd36bc
git.rc: include winuser.h
rimrul Dec 2, 2023
295674f
Merge 'remote-hg-prerequisites' into HEAD
dscho Jun 8, 2018
0673203
Merge branch 'drive-prefix'
dscho Jun 8, 2018
82f2e68
Merge branch 'dont-clean-junctions'
dscho Jul 30, 2019
af7460f
Merge branch 'msys2-python'
dscho May 31, 2019
4a51db2
Merge branch 'mimalloc-v2.0.9'
dscho Sep 8, 2022
2bcbe12
Merge pull request #2375 from assarbad/reintroduce-sideband-config
dscho Oct 30, 2019
417830b
Merge pull request #2405 from dscho/mingw-setsockopt
dscho Nov 25, 2019
20b510d
Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
dscho Jan 3, 2020
0b76054
Merge pull request #2488 from bmueller84/master
dscho Jan 22, 2020
60b6aa6
Merge pull request #2501 from jeffhostetler/clink-debug-curl
dscho Jan 30, 2020
77344ee
Merge pull request #2504 from dscho/access-repo-via-junction
dscho Feb 1, 2020
cf1bc84
Merge pull request #2506 from dscho/issue-2283
dscho Feb 11, 2020
4a2d277
Merge pull request #2535 from dscho/schannel-revoke-best-effort
dscho Mar 4, 2020
6de8151
Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
dscho May 9, 2020
92e7dad
Merge 'add-p-many-files'
dscho Jun 8, 2018
f472f22
Merge pull request #2730 from dscho/crlf-aware-git-add-i
dscho Jul 2, 2020
27165fe
Merge pull request #2714 from lbonanomi/crlf-scissors
dscho Jul 3, 2020
3be2c68
Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
dscho Oct 9, 2020
4a81726
Merge 'git-gui/js/intent-to-add'
dscho Oct 18, 2020
729ba9a
Merge pull request #2974 from derrickstolee/maintenance-and-headless
dscho Jan 11, 2021
18e5024
cmake: install headless-git. (#4338)
dscho Mar 13, 2023
44dd676
Merge pull request #2351 from PhilipOakley/vcpkg-tip
dscho Oct 7, 2019
3d4035c
Merge pull request #2915 from dennisameling/windows-arm64-support
dscho Dec 9, 2020
4467e5a
Merge pull request #3327 from dennisameling/fix-host-cpu
dscho Jul 19, 2021
1855450
Merge pull request #3150 from dscho/ci-cache-vcpkg-artifacts-g4w
dscho Mar 28, 2021
c150144
Merge pull request #3165 from dscho/increase-allowed-length-of-interp…
dscho Apr 3, 2021
50fe172
Merge pull request #3220 from dscho/there-is-no-vs/master-anymore
dscho May 17, 2021
fc5c709
Merge pull request #3293 from pascalmuller/http-support-automatically…
dscho Jun 24, 2021
35f19a3
Merge pull request #3349 from vdye/feature/ci-subtree-tests
dscho Aug 10, 2021
65a6675
Merge pull request #3306 from PhilipOakley/vs-sln
dscho Oct 12, 2021
37a46af
Merge pull request #3417 from dscho/initialize-core.symlinks-earlier
dscho Oct 13, 2021
f45af47
Merge branch 'mark-v4-fsmonitor-experimental' into try-v4-fsmonitor
jeffhostetler Sep 29, 2021
c23b475
Merge pull request #3533 from PhilipOakley/hashliteral_t
dscho Dec 15, 2021
779d54d
Merge pull request #3791: Various fixes around `safe.directory`
derrickstolee Apr 13, 2022
670471b
Merge pull request #3751 from rkitover/native-term
dscho Apr 21, 2022
fa236b3
Merge pull request #3875 from 1480c1/wine/detect_msys_tty
dscho May 30, 2022
d6444d7
Merge branch 'optionally-dont-append-atomically-on-windows'
dscho Jun 23, 2022
fa95282
Merge branch 'fsync-object-files-always'
dscho Oct 11, 2018
14e93b4
Merge branch 'ci-fixes'
dscho Feb 11, 2021
b72027c
Merge pull request #3942 from rimrul/mingw-tsaware
dscho Jul 27, 2022
3e5c7cb
Fix Windows version resources (#4092)
dscho Nov 3, 2022
dd77324
Merge branch 'builtin-swap-functions'
dscho Nov 23, 2022
2c937ca
Add support for CLANGARM64 target (#3916)
dscho Oct 28, 2022
97e6c50
Fix global repository field not being cleared (#4083)
dscho Dec 20, 2022
8c44af3
Skip linking the "dashed" `git-<command>`s for built-ins (#4252)
dscho Jan 31, 2023
0f0d858
Git GUI: fix Repository>Explore Working Copy (#4357)
dscho Mar 21, 2023
ca5f15c
Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl (…
dscho May 15, 2023
3570aa7
Merge branch 'nano-server'
dscho Aug 7, 2023
6b30db8
Additional error checks for issuing the windows.appendAtomically warn…
dscho Aug 7, 2023
79bc3c3
win32: use native ANSI sequence processing, if possible (#4700)
dscho Dec 2, 2023
54d9180
ARM64: Embed manifest properly (#4718)
dscho Dec 7, 2023
1f57497
build(deps): bump mshick/add-pr-comment from 1 to 2
dependabot[bot] Feb 7, 2024
ec2d8db
build(deps): bump actions/setup-go from 2 to 5
dependabot[bot] Feb 7, 2024
82d6f85
build(deps): bump microsoft/setup-msbuild from 1 to 2
dependabot[bot] Feb 12, 2024
6a3fc41
dependabot: help keeping GitHub Actions versions up to date (#4792)
rimrul Feb 7, 2024
1fc651a
Win32: make FILETIME conversion functions public
kblees Jul 6, 2013
7392f0b
Win32: dirent.c: Move opendir down
kblees Sep 8, 2013
50ca74a
mingw: make the dirent implementation pluggable
kblees Sep 8, 2013
029bfbb
Win32: make the lstat implementation pluggable
kblees Sep 8, 2013
ddad2ed
mingw: add infrastructure for read-only file system level caches
kblees Sep 8, 2013
a708aac
mingw: add a cache below mingw's lstat and dirent implementations
kblees Oct 1, 2013
b2aa80a
fscache: load directories only once
kblees Jun 24, 2014
c2c249d
Merge branch 'ready-for-upstream'
dscho Oct 11, 2018
78eaedc
fscache: add key for GIT_TRACE_FSCACHE
jeffhostetler Jan 24, 2017
52e5303
dir.c: make add_excludes aware of fscache during status
jeffhostetler Nov 1, 2017
0fa5fc2
fscache: remember not-found directories
jeffhostetler Dec 13, 2016
3f51586
fscache: make fscache_enabled() public
jeffhostetler Dec 20, 2017
843f261
fscache: add a test for the dir-not-found optimization
dscho Jan 25, 2017
b935fb6
add: use preload-index and fscache for performance
jeffhostetler Nov 22, 2016
c9e4f54
dir.c: regression fix for add_excludes with fscache
jeffhostetler Dec 20, 2017
d7a8910
fetch-pack.c: enable fscache for stats under .git/objects
Nov 22, 2017
c28e607
checkout.c: enable fscache for checkout again
Jan 30, 2018
bbd50d0
Enable the filesystem cache (fscache) in refresh_index().
benpeart Sep 7, 2018
c177751
fscache: use FindFirstFileExW to avoid retrieving the short name
benpeart Oct 23, 2018
56b5f03
status: disable and free fscache at the end of the status command
benpeart Nov 1, 2018
f66b44d
mem_pool: add GIT_TRACE_MEMPOOL support
benpeart Oct 4, 2018
3f6d11b
fscache: fscache takes an initial size
benpeart Nov 2, 2018
e4fa72c
fscache: update fscache to be thread specific instead of global
benpeart Oct 4, 2018
56d493e
fscache: add GIT_TEST_FSCACHE support
benpeart Oct 4, 2018
6453004
fscache: add fscache hit statistics
benpeart Sep 25, 2018
aa996e0
fscache: teach fscache to use mempool
benpeart Nov 2, 2018
4cb1b2b
fscache: remember the reparse tag for each entry
dscho Dec 11, 2018
565c51c
fscache: implement an FSCache-aware is_mount_point()
dscho Dec 11, 2018
049d093
fscache: make fscache_enable() thread safe
benpeart Nov 16, 2018
6e11a86
fscache: teach fscache to use NtQueryDirectoryFile
benpeart Nov 15, 2018
487504c
unpack-trees: enable fscache for sparse-checkout
derrickstolee Jun 12, 2019
02af368
clean: make use of FSCache
dscho Dec 11, 2018
3c2ef68
git-gui--askyesno: fix funny text wrapping
dscho Sep 20, 2017
1e5089b
git-gui: provide question helper for retry fallback on Windows
hvoigt Feb 21, 2010
4515dcd
git-gui--askyesno: allow overriding the window title
dscho Sep 20, 2017
081cd82
gitk: Unicode file name support
kblees Feb 4, 2012
b6bd666
git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
dscho Jul 23, 2010
d812052
git-gui--askyesno (mingw): use Git for Windows' icon, if available
dscho Sep 20, 2017
08088d4
gitk: Use an external icon file on Windows
sschuberth Jul 22, 2012
631e5e1
gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
dscho Feb 16, 2016
eaec3f6
Merge 'git-gui' into HEAD
dscho Jun 7, 2018
67f2b2a
gitk: make the "list references" default window width wider
sidecut Jan 21, 2016
c4d1f28
Merge branch 'git-gui-askyesno'
dscho Jun 8, 2018
f96ac81
Merge branch 'fscache'
dscho Nov 15, 2018
09f6808
Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
dscho Jun 8, 2018
173499b
Merge 'gitk' into HEAD
dscho Jun 7, 2018
91a5841
Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_…
dscho Jun 8, 2018
18e6317
Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fs…
dscho Jun 8, 2018
9a0a123
Merge pull request #1426 from atetubou/fetch_pack
dscho Jun 8, 2018
fc0f930
Merge pull request #1468 from atetubou/fscache_checkout_flush
dscho Oct 12, 2018
1f5892d
Merge pull request #1827 from benpeart/fscache_refresh_index
dscho Sep 27, 2018
783e302
Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
dscho Nov 5, 2018
8987615
Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
dscho Nov 5, 2018
f0872e0
Merge pull request #1911 from benpeart/git_test_fscache-gfw
dscho Nov 5, 2018
df7eefb
Merge pull request #1910 from benpeart/fscache_statistics-gfw
dscho Nov 16, 2018
0e57395
Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
dscho Nov 16, 2018
8c1d0b2
Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
dscho Nov 26, 2018
2596665
Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
dscho Nov 27, 2018
5490179
Merge branch 'fscache-and-sparse-checkout'
derrickstolee Jun 18, 2019
2d3e5bd
pack-objects (mingw): demonstrate a segmentation fault with large deltas
vangdfang Jan 9, 2014
8e82ddc
Merge branch 'dont-clean-junctions-fscache'
dscho Jul 23, 2019
3d97521
mingw: support long paths
kblees Jul 28, 2015
2938bf5
Win32: fix 'lstat("dir/")' with long paths
kblees Jul 4, 2014
d3f9f35
mingw: Support `git_terminal_prompt` with more terminals
kblees Mar 19, 2015
835aab1
win32(long path support): leave drive-less absolute paths intact
dscho Sep 6, 2023
7a2bc38
compat/fsmonitor/fsm-*-win32: support long paths
jeffhostetler Mar 25, 2022
91db5cd
clean: suggest using `core.longPaths` if paths are too long to remove
mathstuf Apr 22, 2022
64f1993
strbuf_readlink: don't call readlink twice if hint is the exact link …
kblees May 11, 2015
ff3bcfe
strbuf_readlink: support link targets that exceed PATH_MAX
kblees May 11, 2015
9eedc45
lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
kblees May 11, 2015
02fcad4
Win32: don't call GetFileAttributes twice in mingw_lstat()
kblees May 12, 2015
88898ca
compat/terminal.c: only use the Windows console if bash 'read -r' fails
kblees May 9, 2015
9a0406c
Win32: implement stat() with symlink support
kblees May 15, 2015
fae9178
mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
dscho Feb 23, 2018
ebb4cbd
Win32: remove separate do_lstat() function
kblees May 11, 2015
e19ba9b
Unbreak interactive GPG prompt upon signing
dscho Sep 6, 2016
ca4eb31
Win32: let mingw_lstat() error early upon problems with reparse points
kblees May 23, 2015
1f0dd07
mingw: teach fscache and dirent about symlinks
kblees Jan 10, 2017
293d18a
Win32: lstat(): return adequate stat.st_size for symlinks
kblees May 15, 2015
d9a2b0c
Win32: factor out retry logic
kblees May 19, 2015
a0ded62
Win32: change default of 'core.symlinks' to false
kblees May 23, 2015
81dd006
Win32: add symlink-specific error codes
kblees May 15, 2015
2d56f47
Win32: mingw_unlink: support symlinks to directories
kblees May 23, 2015
3495257
Win32: mingw_rename: support renaming symlinks
kblees May 19, 2015
0f4229a
Win32: mingw_chdir: change to symlink-resolved directory
kblees May 23, 2015
83b9eea
Win32: implement readlink()
kblees May 23, 2015
41f21df
mingw: lstat: compute correct size for symlinks
billziss-gh May 28, 2020
8a9711d
Win32: implement basic symlink() functionality (file symlinks only)
kblees May 23, 2015
a57efa6
Win32: symlink: add support for symlinks to directories
kblees May 23, 2015
be19594
mingw: introduce code to detect whether we're inside a Windows container
ZCube Apr 23, 2018
4a23132
mingw: try to create symlinks without elevated permissions
dscho May 30, 2017
33d504e
mingw: when running in a Windows container, try to rename() harder
ZCube Apr 23, 2018
a02e6a7
mingw: emulate stat() a little more faithfully
dscho Mar 2, 2020
cf77157
mingw: move the file_attr_to_st_mode() function definition
ZCube Apr 23, 2018
80afdbd
mingw: special-case index entries for symlinks with buggy size
dscho Jun 4, 2020
d954fc6
Win32: symlink: move phantom symlink creation to a separate function
piscisaureus Oct 26, 2018
1882c46
Introduce helper to create symlinks that knows about index_state
dscho Feb 11, 2019
a28a0f8
mingw: allow to specify the symlink type in .gitattributes
piscisaureus Oct 26, 2018
b0068a2
mingw: Windows Docker volumes are *not* symbolic links
dscho Apr 23, 2018
1309f48
mingw: work around rename() failing on a read-only file
dsl101 Jul 28, 2023
2648083
Win32: symlink: add test for `symlink` attribute
piscisaureus Oct 26, 2018
64c8e89
mingw: explicitly specify with which cmd to prefix the cmdline
dscho Jul 20, 2017
d183f32
mingw: when path_lookup() failed, try BusyBox
dscho Jul 20, 2017
e046af6
test-lib: avoid unnecessary Perl invocation
dscho Aug 5, 2017
c13d5f0
test-tool: learn to act as a drop-in replacement for `iconv`
dscho Jul 20, 2017
8d6a91e
tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
dscho Jul 20, 2017
39deb53
gitattributes: mark .png files as binary
dscho Oct 11, 2018
1b12d2e
tests: move test PNGs into t/lib-diff/
dscho Aug 5, 2017
f69fa03
tests: only override sort & find if there are usable ones in /usr/bin/
dscho Jul 17, 2017
c619329
tests: use the correct path separator with BusyBox
dscho Nov 19, 2018
1f509e7
mingw: only use Bash-ism `builtin pwd -W` when available
dscho Jun 29, 2017
67acbe8
tests (mingw): remove Bash-specific pwd option
dscho Jun 30, 2017
a18a0f8
test-lib: add BUSYBOX prerequisite
dscho Jul 19, 2017
6b2142b
t5003: use binary file from t/lib-diff/
dscho Aug 5, 2017
6e490c1
t5532: workaround for BusyBox on Windows
dscho Jul 21, 2017
d4287d2
t5605: special-case hardlink test for BusyBox-w32
dscho Jul 21, 2017
15b88e7
t5813: allow for $PWD to be a Windows path
dscho Jul 5, 2017
891b29f
t9200: skip tests when $PWD contains a colon
dscho Jul 7, 2017
f8c17f3
mingw: add a Makefile target to copy test artifacts
dscho Jul 19, 2017
4a2ec98
mingw: kill child processes in a gentler way
dscho May 17, 2017
d5e2881
mingw: optionally enable wsl compability file mode bits
swigger Jun 7, 2023
5aa9ec7
mingw: really handle SIGINT
dscho Apr 22, 2018
875251f
mingw: do not call xutftowcs_path in mingw_mktemp
neerajsi-msft Oct 27, 2021
fe47e09
Partially un-revert "editor: save and reset terminal after calling ED…
dscho Nov 25, 2021
576d1c3
reset: reinstate support for the deprecated --stdin option
dscho Dec 10, 2019
315f0ea
fsmonitor: reintroduce core.useBuiltinFSMonitor
vdye Apr 4, 2022
b0702ab
Describe Git for Windows' architecture [no ci]
dscho Feb 13, 2023
04e2a52
Modify the Code of Conduct for Git for Windows
dscho Oct 11, 2019
213f046
CONTRIBUTING.md: add guide for first-time contributors
derrickstolee Mar 1, 2018
2bc7f44
README.md: Add a Windows-specific preamble
dscho Jan 10, 2014
76c1e92
Add an issue template
shiftkey Feb 18, 2016
2cec329
Add a GitHub workflow to monitor component updates
dscho Sep 29, 2020
c3d7282
Modify the GitHub Pull Request template (to reflect Git for Windows)
Dec 22, 2017
9e7f27a
dependabot: help keeping GitHub Actions versions up to date
dscho Feb 6, 2024
e01cfab
.github: Add configuration for the Sentiment Bot
dscho Feb 20, 2018
4ac6362
Document how $HOME is set on Windows
alejandro5042 Mar 9, 2018
f23df79
Merge branch 'gitk-and-git-gui-patches'
dscho Oct 11, 2018
3fb190d
SECURITY.md: document Git for Windows' policies
dscho Aug 23, 2019
fbcb073
Merge branch 'long-paths'
dscho Nov 15, 2018
6a93306
Merge branch 'fix-v4-fsmonitor-long-paths' into try-v4-fsmonitor
jeffhostetler Sep 29, 2021
15fb439
Merge pull request #3817 from mathstuf/name-too-long-advice
dscho Apr 22, 2022
1df9277
Merge branch 'msys2'
dscho Nov 15, 2018
0679166
Merge branch 'kblees/kb/symlinks'
dscho Nov 15, 2018
e8d3660
Merge 'docker-volumes-are-no-symlinks'
dscho Oct 12, 2018
b6fc2f4
mingw: try resetting the read-only bit if rename fails (#4527)
dscho Aug 7, 2023
0c4975d
Merge pull request #1897 from piscisaureus/symlink-attr
dscho Oct 31, 2018
2eaa368
Merge branch 'busybox-w32'
dscho Feb 7, 2019
c9b62a0
Merge branch 'wsl-file-mode-bits'
dscho Aug 7, 2023
0e7f9c5
Merge pull request #1170 from dscho/mingw-kill-process
dscho Oct 11, 2018
5dd570d
Merge pull request #3492 from dscho/ns/batched-fsync
vdye Oct 28, 2021
7b740af
Merge branch 'un-revert-editor-save-and-reset'
dscho Jan 15, 2022
e480155
Merge branch 'phase-out-reset-stdin'
dscho Jun 8, 2018
e3b305c
Merge branch 'deprecate-core.useBuiltinFSMonitor'
dscho Jan 24, 2023
f6550ef
Merge pull request #2837 from dscho/monitor-component-updates
dscho Oct 7, 2020
d201bdd
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
Prev Previous commit
Next Next commit
bswap.h: add support for built-in bswap functions
Newer compiler versions, like GCC 10 and Clang 12, have built-in
functions for bswap32 and bswap64. This comes in handy, for example,
when targeting CLANGARM64 on Windows, which would not be supported
without this logic.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
  • Loading branch information
dennisameling authored and dscho committed Feb 14, 2024
commit e570cb668a0fb2fa7bd37ca79c28361820dce44f
14 changes: 13 additions & 1 deletion compat/bswap.h
Original file line number Diff line number Diff line change
@@ -35,7 +35,19 @@ static inline uint64_t default_bswap64(uint64_t val)
#undef bswap32
#undef bswap64

#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
/**
* __has_builtin is available since Clang 10 and GCC 10.
* Below is a fallback for older compilers.
*/
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

#if __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)
#define bswap32(x) __builtin_bswap32((x))
#define bswap64(x) __builtin_bswap64((x))

#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))

#define bswap32 git_bswap32
static inline uint32_t git_bswap32(uint32_t x)