config.mak.dev: suppress C11 extension warning for Clang on Linux#2291
Open
kiranani wants to merge 678 commits into
Open
config.mak.dev: suppress C11 extension warning for Clang on Linux#2291kiranani wants to merge 678 commits into
kiranani wants to merge 678 commits into
Conversation
Internals of "git fsck" have been refactored to not depend on the global `the_repository` variable. * ps/fsck-wo-the-repository: builtin/fsck: stop using `the_repository` in error reporting builtin/fsck: stop using `the_repository` when marking objects builtin/fsck: stop using `the_repository` when checking packed objects builtin/fsck: stop using `the_repository` with loose objects builtin/fsck: stop using `the_repository` when checking reflogs builtin/fsck: stop using `the_repository` when checking refs builtin/fsck: stop using `the_repository` when snapshotting refs builtin/fsck: fix trivial dependence on `the_repository` fsck: drop USE_THE_REPOSITORY fsck: store repository in fsck options fsck: initialize fsck options via a function fetch-pack: move fsck options into function scope
Reduce dependency on `the_repository` in add-patch.c file. * sp/add-patch-with-fewer-the-repository: add-patch: use repository instance from add_i_state instead of the_repository
The way the "git log -L<range>:<file>" feature is bolted onto the log/diff machinery is being reworked a bit to make the feature compatible with more diff options, like -S/G. * mm/line-log-use-standard-diff-output: doc: note that -L supports patch formatting and pickaxe options t4211: add tests for -L with standard diff options line-log: route -L output through the standard diff pipeline line-log: fix crash when combined with pickaxe options
Handling of signed commits and tags in fast-import has been made more configurable. * jt/fast-import-signed-modes: fast-import: add 'abort-if-invalid' mode to '--signed-tags=<mode>' fast-import: add 'sign-if-invalid' mode to '--signed-tags=<mode>' fast-import: add 'strip-if-invalid' mode to '--signed-tags=<mode>' fast-import: add 'abort-if-invalid' mode to '--signed-commits=<mode>' fast-export: check for unsupported signing modes earlier
The check in "receive-pack" to prevent a checked out branch from getting updated via updateInstead mechanism has been corrected. * ps/receive-pack-updateinstead-in-worktree: receive-pack: use worktree HEAD for updateInstead t5516: clean up cloned and new-wt in denyCurrentBranch and worktrees test t5516: test updateInstead with worktree and unborn bare HEAD
Test clean-up. * ss/t7004-unhide-git-failures: t7004: replace wc -l with modern test helpers
Further work to adjust the codebase for C23 that changes functions like strchr() that discarded constness when they return a pointer into a const string to preserve constness. * jk/c23-const-preserving-fixes-more: refs/files-backend: drop const to fix strchr() warning http: drop const to fix strstr() warning range-diff: drop const to fix strstr() warnings pkt-line: make packet_reader.line non-const skip_prefix(): check const match between in and out params pseudo-merge: fix disk reads from find_pseudo_merge() find_last_dir_sep(): convert inline function to macro run-command: explicitly cast away constness when assigning to void pager: explicitly cast away strchr() constness transport-helper: drop const to fix strchr() warnings http: add const to fix strchr() warnings convert: add const to fix strchr() warnings
Various code clean-up around odb subsystem. * ps/odb-cleanup: odb: drop unneeded headers and forward decls odb: rename `odb_has_object()` flags odb: use enum for `odb_write_object` flags odb: rename `odb_write_object()` flags treewide: use enum for `odb_for_each_object()` flags CodingGuidelines: document our style for flags
Code cleanup. * jd/cache-tree-trace-wo-the-repository: cache-tree: use index state repository in trace2 calls
Update reftable library part with what is used in libgit2 to improve portability to different target codebases and platforms. * ps/reftable-portability: reftable/system: add abstraction to mmap files reftable/system: add abstraction to retrieve time in milliseconds reftable/fsck: use REFTABLE_UNUSED instead of UNUSED reftable/stack: provide fsync(3p) via system header reftable: introduce "reftable-system.h" header
add_files_to_cache() used diff_files() to detect only the paths that are different between the index and the working tree and add them, which does not need rename detection, which interfered with unnecessary conflicts. * ng/add-files-to-cache-wo-rename: read-cache: disable renames in add_files_to_cache
The way dash 0.5.13 handles non-ASCII contents in here-doc is buggy and breaks our existing tests, which unfortunately have been rewritten to avoid triggering the bug. * ps/dash-buggy-0.5.13-workaround: t9300: work around partial read bug in Dash v0.5.13 t: work around multibyte bug in quoted heredocs with Dash v0.5.13
The experimental `git replay` command learned the `--ref=<ref>` option to allow specifying which ref to update, overriding the default behavior. * tc/replay-ref: replay: allow to specify a ref with option --ref replay: use stuck form in documentation and help message builtin/replay: mark options as not negatable
* js/mingw-use-strftime-directly-in-ucrt-build: mingw: use strftime() directly in UCRT builds
* js/cmake-needs-writev-compat-too: cmake: use writev(3p) wrapper as needed
Further work to adjust the codebase for C23 that changes functions like strchr() that discarded constness when they return a pointer into a const string to preserve constness. * jk/c23-const-preserving-fixes-more: git-compat-util: fix CONST_OUTPARAM typo and indentation
"git backfill" is capable of auto-detecting a sparsely checked out working tree, which was broken. * th/backfill-auto-detect-sparseness-fix: backfill: auto-detect sparse-checkout from config
Glitches in "git history -h" have been corrected. * rs/history-short-help-fix: history: fix short help for argument of --update-refs
"git config list" is the official way to spell "git config -l" and "git config --list". Use it to update the documentation. * kh/doc-config-list: doc: gitcvs-migration: rephrase “man page” doc: replace git config --list/-l with `list`
"git rev-list --maximal-only" has been optimized by borrowing the logic used by "git show-branch --independent", which computes the same kind of information much more efficiently. * ds/rev-list-maximal-only-optim: rev-list: use reduce_heads() for --maximal-only p6011: add perf test for rev-list --maximal-only t6600: test --maximal-only and --independent
* jt/index-fd-wo-repo-regression-fix: object-file: avoid ODB transaction when not writing objects
index.skipHash (Scalar default) and split-index are incompatible: the shared index gets a null OID when skipHash skips computing the hash, and the null OID causes the shared index to not be loaded on re-read. This triggers a BUG assertion in fsmonitor when the fsmonitor_dirty bitmap references more entries than the (now empty) index has. Disable GIT_TEST_SPLIT_INDEX in the scalar clone tests that hit this: tests 12, 13, and 22 in t9210 (matching the existing workaround in test 16), and all of t9211 (every test does scalar clone). Signed-off-by: Paul Tarjan <github@paulisageek.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Various AsciiDoc markup fixes in 'git config' documentation and related files to ensure lists and formatting are rendered correctly. * ta/doc-config-adoc-fixes: doc: git-config: escape erroneous highlight markup doc: config/sideband: fix description list delimiter doc: config: terminate runaway lists
`git ls-files --modified` and `git ls-files --deleted` have been optimized to filter with pathspec before calling lstat() when there is only a single pathspec item, avoiding unnecessary filesystem access for entries that will not be shown. * td/ls-files-pathspec-prefilter: ls-files: filter pathspec before lstat
The UNUSED macro in 'compat/posix.h' has been updated to use a newly introduced GIT_CLANG_PREREQ macro for compiler version checks, and the existing GIT_GNUC_PREREQ macro has been modernized to use explicit major/minor comparisons rather than bit-shifting. * dl/posix-unused-warning-clang: compat/posix.h: simplify GIT_GNUC_PREREQ() comparison compat/posix.h: clean up GIT_GNUC_PREREQ() and UNUSED compat/posix.h: enable UNUSED warning messages for Clang
compute_reachable_generation_numbers() in commit-graph used a 32-bit integer to accumulate parent generations, which is OK for generation number v1 (topological levels), but with generation number v2 (adjusted committer timestamps), it truncated timestamps beyond 2106. Fixed by widening the accumulator to timestamp_t. * en/commit-graph-timestamp-fix: commit-graph: use timestamp_t for max parent generation accumulator
* js/osxkeychain-build-wo-rust: osxkeychain: fix build with Rust
Project-specific configuration for b4 has been introduced, and the documentation has been updated to recommend using it as a streamlined method for submitting patches. * ps/doc-recommend-b4: b4: introduce configuration for the Git project MyFirstContribution: recommend the use of b4 MyFirstContribution: recommend shallow threading of cover letters
* rs/cat-file-default-format-optim: cat-file: speed up default format
* kw/gitattributes-typofix: gitattributes: fix eol attribute for Perl scripts
A regression in the error diagnosis code for invalid .git files has been fixed, avoiding a potential NULL-pointer crash when reporting that a .git file does not point to a valid repository. * jk/setup-gitfile-diag-fix: read_gitfile(): simplify NOT_A_REPO error message
"ort" merge backend handles merging corrupt trees better by aborting when it should. * en/ort-harden-against-corrupt-trees: cache-tree: fix verify_cache() to catch non-adjacent D/F conflicts merge-ort: abort merge when trees have duplicate entries merge-ort: free diff pairs queue in clear_or_reinit_internal_opts() merge-ort: drop unnecessary show_all_errors from collect_merge_info() merge-ort: propagate callback errors from traverse_trees_wrapper()
A hotfix to an earlier attempt to update code paths that assumed "unsigned long" was long enough for "size_t". * js/objects-larger-than-4gb-on-windows: zlib: properly clamp to uLong
* js/objects-larger-than-4gb-on-windows-more: odb: use size_t for object_info.sizep and the size APIs packfile,delta: drop the `cast_size_t_to_ulong()` wrappers pack-objects: use size_t for in-core object sizes packfile: widen unpack_entry()'s size out-parameter to size_t pack-objects(check_pack_inflate()): use size_t instead of unsigned long patch-delta: use size_t for sizes compat/msvc: use _chsize_s for ftruncate
Commands that list branches and tags (like git branch and git tag) have been optimized to pass the namespace prefix when initializing their ref iterator, avoiding a loose-ref scaling regression in repositories with many unrelated loose references. * td/ref-filter-restore-prefix-iteration: ref-filter: restore prefix-scoped iteration
The packed object source has been refactored into a proper struct odb_source. * ps/odb-source-packed: odb/source-packed: drop pointer to "files" parent source midx: refactor interfaces to work on "packed" source odb/source-packed: stub out remaining functions odb/source-packed: wire up `freshen_object()` callback odb/source-packed: wire up `find_abbrev_len()` callback odb/source-packed: wire up `count_objects()` callback odb/source-packed: wire up `for_each_object()` callback odb/source-packed: wire up `read_object_stream()` callback odb/source-packed: wire up `read_object_info()` callback packfile: use higher-level interface to implement `has_object_pack()` odb/source-packed: wire up `reprepare()` callback odb/source-packed: wire up `close()` callback odb/source-packed: start converting to a proper `struct odb_source` odb/source-packed: store pointer to "files" instead of generic source packfile: move packed source into "odb/" subsystem packfile: split out packfile list logic packfile: rename `struct packfile_store` to `odb_source_packed`
The global configuration variables protect_hfs and protect_ntfs have been migrated into struct repo_config_values to tie them to per-repository configuration state. * ty/move-protect-hfs-ntfs: environment: use 'repo->initialized' for repo_protect_hfs() and repo_protect_ntfs()
Support for hashing loose or packed objects larger than 4GB on Windows and other LLP64 platforms has been improved by converting object header buffers and data-handling functions from 'unsigned long' to 'size_t'. * po/hash-object-size-t: hash-object: add a >4GB/LLP64 test case using filtered input hash-object: add another >4GB/LLP64 test case hash-object --stdin: verify that it works with >4GB/LLP64 hash algorithms: use size_t for section lengths object-file.c: use size_t for header lengths hash-object: demonstrate a >4GB/LLP64 problem
Wean the Windows builds in GitLab CI procedure away from (unfortunately unreliable) Chocolatey to install dependencies. * ps/gitlab-ci-windows: gitlab-ci: migrate Windows builds away from Chocolatey
* js/win32-localtime-r: win32: ensure that `localtime_r()` is declared even in i686 builds
The `fetch.followRemoteHEAD` configuration variable has been added to provide a default for the per-remote `remote.<name>.followRemoteHEAD` setting. * mh/fetch-follow-remote-head-config: fetch: fixup a misaligned comment fetch: add configuration variable fetch.followRemoteHEAD fetch: refactor do_fetch handling of followRemoteHEAD fetch: return 0 on known git_fetch_config fetch: rename function report_set_head t5510: cleanup remote in followRemoteHEAD dangling ref test doc: explain fetchRemoteHEADWarn advice fetch: fixup set_head advice for warn-if-not-branch
The trailer sections in SubmittingPatches have been updated to encourage use of standard trailers. * kh/submittingpatches-trailers: SubmittingPatches: note that trailer order matters SubmittingPatches: be consistent with trailer markup SubmittingPatches: document Based-on-patch-by trailer SubmittingPatches: discourage common Linux trailers SubmittingPatches: encourage trailer use for substantial help
Xcode 15 and later has a linker set to complain when the same library archive is listed twice on the command line. Squelch the annoyance. * hn/macos-linker-warning: config.mak.uname: avoid macOS dup-library warning
When building Git with Clang on Linux with DEVELOPER=1, the build fails because Clang treats C11 features used in glibc headers as extensions and raises errors due to -std=gnu99, -pedantic, and -Werror. Specifically, glibc's string.h uses _Generic (a C11 feature) in macros like strchr. When these macros are expanded in Git's C files, Clang warns about them being C11 extensions. GCC does not exhibit this behavior because it suppresses pedantic warnings for macros defined in system headers. To fix this, add -Wno-c11-extensions to DEVELOPER_CFLAGS when using Clang, but restrict it to Linux (uname_S == Linux). This suppresses the warning for glibc headers while keeping the build strict on other platforms (like macOS) to catch accidental C11 usage in Git's own code. Signed-off-by: Shnatu <snatu@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc: Pablo pabloosabaterr@gmail.com