summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-08-08parse-options: refactor flags for usage_with_options_internalD. Ben Knoble
When reading or editing calls to usage_with_options_internal, it is difficult to tell what trailing "0, 0", "0, 1", "1, 0" arguments mean (NB there is never a "1, 1" case). Give the flags readable names to improve call-sites without changing any behavior. Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-08Merge branch 'ua/t1517-short-help-tests' into dk/help-allJunio C Hamano
* ua/t1517-short-help-tests: t5304: move `prune -h` test from t1517 t5200: move `update-server-info -h` test from t1517 t/t1517: automate `git subcmd -h` tests outside a repository
2025-08-08t5304: move `prune -h` test from t1517Usman Akinyemi
t1517 is now focused on testing subcommands outside a repository. Move the in-repo `-h` test for `prune` to t5304, which covers this command. Suggested-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-08t5200: move `update-server-info -h` test from t1517Usman Akinyemi
t1517 is now focused on testing subcommands outside a repository. Move the in-repo `-h` test for `update-server-info` to t5200, which covers this command. Suggested-by: Patrick Steinhardt <ps@pks.im> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-08t/t1517: automate `git subcmd -h` tests outside a repositoryUsman Akinyemi
Replace manual `-h` tests with a loop over all subcommands using `git --list-cmds=main`. This ensures consistent coverage of `-h` behavior outside a repo and future-proofs the test by covering new commands automatically. Known exceptions are skipped or marked as expected failures. Suggested-by: Patrick Steinhardt <ps@pks.im> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-01The sixteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-01Merge branch 'sk/reftable-clarify-tests'Junio C Hamano
The reftable unit tests are now ported to the "clar" unit testing framework. * sk/reftable-clarify-tests: t/unit-tests: finalize migration of reftable-related tests t/unit-tests: convert reftable stack test to use clar t/unit-tests: convert reftable record test to use clar t/unit-tests: convert reftable readwrite test to use clar t/unit-tests: convert reftable table test to use clar t/unit-tests: convert reftable pq test to use clar t/unit-tests: convert reftable merged test to use clar t/unit-tests: convert reftable block test to use clar t/unit-tests: convert reftable basics test to use clar test framework t/unit-tests: implement clar specific reftable test helper functions
2025-08-01Merge branch 'ly/pull-autostash'Junio C Hamano
"git pull" learned to pay attention to pull.autostash configuration variable, which overrides rebase/merge.autostash. * ly/pull-autostash: pull: add pull.autoStash config option
2025-08-01Merge branch 'jc/document-test-balloons-in-flight'Junio C Hamano
To help our developers, document what C99 language features are being considered for adoption, in addition to what past experiments have already decided. * jc/document-test-balloons-in-flight: CodingGuidelines: document test balloons in flight
2025-08-01Merge branch 'ag/imap-send-list-folders-doc'Junio C Hamano
Document recently added "git imap-send --list" with an example. * ag/imap-send-list-folders-doc: docs: explain how to use `git imap-send --list` command to get a list of available folders
2025-08-01Merge branch 'cb/meson-avoid-broken-macos-pcre2'Junio C Hamano
Build fix for macOS. * cb/meson-avoid-broken-macos-pcre2: meson: work around broken system PCRE2 dependency in macOS
2025-08-01Merge branch 'jc/ci-print-test-failures-fix'Junio C Hamano
CI fix. * jc/ci-print-test-failures-fix: ci: allow github-actions print test failures again
2025-08-01Merge branch 'jk/unleak-reflog-expire-entry'Junio C Hamano
Leakfix. * jk/unleak-reflog-expire-entry: reflog: close leak of reflog expire entry
2025-08-01Merge branch 'jc/do-not-scan-argv-without-parsing'Junio C Hamano
Update a hard-to-read in-code NEEDSWORK comment. * jc/do-not-scan-argv-without-parsing: rev-list: update a NEEDSWORK comment
2025-08-01Merge branch 'jk/revision-no-early-output'Junio C Hamano
Remove unsupported, unused, and unsupportable old option from "git log". * jk/revision-no-early-output: revision: drop early output option
2025-08-01Merge branch 'jc/rev-list-info-cleanup'Junio C Hamano
Move structure definition from unrelated header file to where it belongs. * jc/rev-list-info-cleanup: rev-list: make "struct rev_list_info" static to the only user
2025-07-28The fifteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-28Merge branch 'ac/auto-comment-char-fix'Junio C Hamano
"git commit" that concludes a conflicted merge failed to notice and remove existing comment added automatically (like "# Conflicts:") when the core.commentstring is set to 'auto'. * ac/auto-comment-char-fix: config: set comment_line_str to "#" when core.commentChar=auto commit: avoid scanning trailing comments when 'core.commentChar' is "auto"
2025-07-28Merge branch 'rs/pop-recent-commit-with-prio-queue'Junio C Hamano
The pop_most_recent_commit() function can have quite expensive worst case performance characteristics, which has been optimized by using prio-queue data structure. * rs/pop-recent-commit-with-prio-queue: commit: use prio_queue_replace() in pop_most_recent_commit() prio-queue: add prio_queue_replace() commit: convert pop_most_recent_commit() to prio_queue
2025-07-24The fourteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24Merge branch 'bc/contribution-under-non-real-names'Junio C Hamano
Document that we do not require "real" name when signing your patches off. * bc/contribution-under-non-real-names: SubmittingPatches: allow non-real name contributions
2025-07-24Merge branch 'rj/meson-libexecdir-fix'Junio C Hamano
Meson-based build did not handle libexecdir setting correctly, which has been corrected. * rj/meson-libexecdir-fix: po/meson.build: add missing 'ga' language code meson: fix installation when -Dlibexexdir is set
2025-07-24Merge branch 'ss/compat-bswap-revamp'Junio C Hamano
Clean-up compat/bswap.h mess. * ss/compat-bswap-revamp: bswap.h: provide a built-in based version of bswap32/64 if possible bswap.h: remove optimized x86 version of bswap32/64 bswap.h: always overwrite ntohl/ ntohll macros bswap.h: define GIT_LITTLE_ENDIAN on msvc as little endian bswap.h: add support for __BYTE_ORDER__
2025-07-24Merge branch 'pw/config-kvi-remove-path'Junio C Hamano
Remove a redundant member from kvi struct. * pw/config-kvi-remove-path: config: remove unneeded struct field
2025-07-24Merge branch 'kl/test-installed-fix'Junio C Hamano
GIT_TEST_INSTALLED was not honored in the recent topic related to SHA256 hashes, which has been corrected. * kl/test-installed-fix: test-lib: respect GIT_TEST_INSTALLED when querying default hash
2025-07-24Merge branch 'pw/adopt-c99-bool-officially'Junio C Hamano
Declare weather-balloon we raised for "bool" type 18 months ago a success and officially allow using the type in our codebase. * pw/adopt-c99-bool-officially: strbuf: convert predicates to return bool git-compat-util: convert string predicates to return bool CodingGuidelines: allow the use of bool
2025-07-24t/unit-tests: finalize migration of reftable-related testsSeyi Kuforiji
The old `lib-reftable.{c,h}` implemented helper functions for our homegrown unit-testing framework. As part of migrating reftable-related tests to the Clar framework, Clar-specific versions of these functions in `lib-reftable-clar.{c,h}` were introduced. Now that all test files using these helpers have been converted to Clar, we can safely remove the original `lib-reftable.{c,h}` and rename the Clar- specific versions back to `lib-reftable.{c,h}`. This restores a clean and consistent naming scheme for shared test utilities. Finally, update our build system to reflect the changes made and remove redundant code related to the reftable tests and our old homegrown unit-testing setup. `test-lib.{c,h}` remains unchanged in our build system as some files particularly `t/helper/test-example-tap.c` depends on it in order to run, and removing that would be beyond the scope of this patch. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable stack test to use clarSeyi Kuforiji
Adapt reftable stack test file to use clar by using clar assertions where necessary. This marks the end of all unit tests migrated away from the `unit-tests/t-*.c` pattern, there are no longer any files matching that glob. Remove the sanity check for `t-*.c` files to prevent Meson configuration errors during CI and local builds. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable record test to use clarSeyi Kuforiji
Adapt reftable record test file to use clar by using clar assertions where necessary. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable readwrite test to use clarSeyi Kuforiji
Adapt reftable readwrite test file to use clar by using clar assertions where necessary. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable table test to use clarSeyi Kuforiji
Adapt reftable table test file to use clar by using clar assertions where necessary. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable pq test to use clarSeyi Kuforiji
Adapt reftable priority queue test file to use clar by using clar assertions where necessary. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable merged test to use clarSeyi Kuforiji
Adapt reftable merged test file to use clar testing framework by using clar assertions where necessary. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable block test to use clarSeyi Kuforiji
Adapt reftable block test file to use clar testing framework by using clar assertions where necessary. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: convert reftable basics test to use clar test frameworkSeyi Kuforiji
Adapt reftable basics test file to clar by using clar assertions where necessary.Break up test edge case to improve modularity and clarity. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24t/unit-tests: implement clar specific reftable test helper functionsSeyi Kuforiji
Helper functions defined in `t/unit-tests/lib-reftable.{c,h}` are required for the reftable-related test files to run. In the current implementation these functions are designed to conform with our homegrown unit-testing structure. So in other to convert the reftable test files, there is need for a clar specific implementation of these helper functions. Implement equivalent helper functions in `lib-reftable-clar.{c,h}` to use clar. These functions conform with the clar testing framework and become available for all reftable-related test files implemented using the clar testing framework, which requires them. This will be used by subsequent commits. Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24CodingGuidelines: document test balloons in flightJunio C Hamano
Due to portability concerns, we do not blindly say "It is in [[this standard]], so we will make liberal use of it" for many features, and use of C99 language features follow this same principle. When we contemplate adopting a language feature that we haven't used in our codebase, we typically first raise a test balloon, which - is a piece of code that exercises the language feature we are trying to see if it is OK to adopt - is in a small section of code that we know everybody who cares about having a working Git must be compiling - is in a fairly stable part of the code, to allow reverting it easily if some platforms do not understand it yet. After a few years, with no breakage report from the community, we'd declare that the feature is now safe to use in our codebase. Before that, we forbid the use of the language construct except for the designated test balloon code site. The CodingGuidelines document lists these selected features that we already have determined that they are safe, and also those features that we know some platforms had trouble with. Let's also start listing ongoing test balloons and expected timeline for adoption. Recently phillip proposed to adopt the syntax to spell a structure literally (i.e. compound literal) with a new test balloon, which Patrick made redundant by pointing out an existing one we had already.but without documenting it. Start the new section with an entry for that test balloon. Helped-by: Patrick Steinhardt <ps@pks.im> Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-23The thirteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-23Merge branch 'cc/fast-import-export-signature-names'Junio C Hamano
Clean up the way how signature on commit objects are exported to and imported from fast-import stream. * cc/fast-import-export-signature-names: fast-(import|export): improve on commit signature output format
2025-07-23Merge branch 'ps/sane-ctype-workaround'Junio C Hamano
Our <sane-ctype.h> header file relied on that the system-supplied <ctype.h> header is not later included, which would override our macro definitions, but "amazon linux" broke this assumption. Fix this by preemptively including <ctype.h> near the beginning of <sane-ctype.h> ourselves. * ps/sane-ctype-workaround: sane-ctype: fix compiler error on Amazon Linux 2
2025-07-23Merge branch 'ly/changed-paths-traversal'Junio C Hamano
Lift the limitation to use changed-path filter in "git log" so that it can be used for a pathspec with multiple literal paths. * ly/changed-paths-traversal: bloom: optimize multiple pathspec items in revision revision: make helper for pathspec to bloom keyvec bloom: replace struct bloom_key * with struct bloom_keyvec bloom: rename function operates on bloom_key bloom: add test helper to return murmur3 hash
2025-07-22reflog: close leak of reflog expire entryJacob Keller
find_cfg_ent() allocates a struct reflog_expire_entry_option via FLEX_ALLOC_MEM and inserts it into a linked list in the reflog_expire_options structure. The entries in this list are never freed, resulting in a leak in cmd_reflog_expire and the gc reflog expire maintenance task: Direct leak of 39 byte(s) in 1 object(s) allocated from: #0 0x7ff975ee6883 in calloc (/lib64/libasan.so.8+0xe6883) #1 0x0000010edada in xcalloc ../wrapper.c:154 #2 0x000000df0898 in find_cfg_ent ../reflog.c:28 #3 0x000000df0898 in reflog_expire_config ../reflog.c:70 #4 0x00000095c451 in configset_iter ../config.c:2116 #5 0x0000006d29e7 in git_config ../config.h:724 #6 0x0000006d29e7 in cmd_reflog_expire ../builtin/reflog.c:205 #7 0x0000006d504c in cmd_reflog ../builtin/reflog.c:419 #8 0x0000007e4054 in run_builtin ../git.c:480 #9 0x0000007e4054 in handle_builtin ../git.c:746 #10 0x0000007e8a35 in run_argv ../git.c:813 #11 0x0000007e8a35 in cmd_main ../git.c:953 #12 0x000000441e8f in main ../common-main.c:9 #13 0x7ff9754115f4 in __libc_start_call_main (/lib64/libc.so.6+0x35f4) #14 0x7ff9754116a7 in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x36a7) #15 0x000000444184 in _start (/home/jekeller/libexec/git-core/git+0x444184) Close this leak by adding a reflog_clear_expire_config() function which iterates the linked list and frees its elements. Call it upon exit of cmd_reflog_expire() and reflog_expire_condition(). Add a basic test which covers this leak. While at it, cover the functionality from commit commit 3cb22b8efe (Per-ref reflog expiry configuration, 2008-06-15). We've had this support for years, but lacked any tests. Co-developed-by: Jeff King <peff@peff.net> Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-22Merge branch 'master' of https://github.com/j6t/git-guiJunio C Hamano
* 'master' of https://github.com/j6t/git-gui: (26 commits) git-gui: eliminate _search_exe git-gui: remove procs gitexec and _git_cmd git-gui: use dashless 'git cmd' form for read/write git-gui: default to full copy for linked worktrees git-gui: use git-clone git-gui: remove non-ttk code git-gui: remove ${NS} indirection for ttk git-gui: always use themed widgets from ttk git-gui: remove redundant check for Tk >= 8.5 git-gui: remove unreachable Tk 8.4 code git-gui: remove unused git-version git-gui: use git_init to create new repository dir git-gui: git-remote is always available git-gui: git merge understands --strategy=recursive git-gui: git-diff knows submodules and textconv git-gui: git-blame understands -w and textconv git-gui: git rev-parse knows show_toplevel git-gui: use git-branch --show-current git-gui: git-diff-index always knows submodules git-gui: git ls-files knows --exclude-standard ...
2025-07-22Merge branch 'master' of https://github.com/j6t/gitkJunio C Hamano
* 'master' of https://github.com/j6t/gitk: (21 commits) gitk: remove header of now empty section "General options" gitk: separate upstream refs when using the sort-by-type option gitk: make 'sort-refs-by-type' optional and persistent gitk: sort by ref type on the 'tags and heads' view gitk: choosefont - remove a stray debugging line gitk: allow horizontal commit-graph scrolling gitk: update aqua scrolling for TclTk 8.6 / TIP171 gitk: update x11 scrolling for TclTk 8.6 / TIP 171 gitk: update win32 scrolling for Tk 8.6 / TIP 171 gitk: mousewheel scrolling functions for Tk 8.6 gitk: wheel scrolling multiplier preference gitk: separate x11 / win32 / aqua Mouse bindings gitk: remove non-ttk support code gitk: replace ${NS} with ttk gitk: always use themed Tk (ttk) gitk: use $config_variables as list for save/restore gitk: remove implementations for Tcl/Tk < 8.6 gitk: Make TclTk 8.6 the minimum, allow 8.7 gitk: remove code targeting git <= 1.7.2 gitk: require git >= 2.20 ...
2025-07-22gitk: remove header of now empty section "General options"Johannes Sixt
An earlier commit remove the only option that was available under "General options". We don't need the header for the empty section. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2025-07-22Merge branch 'ml/abandon-old-version' (early part)Johannes Sixt
* 'ml/abandon-old-version' (early part): gitk: allow horizontal commit-graph scrolling gitk: update aqua scrolling for TclTk 8.6 / TIP171 gitk: update x11 scrolling for TclTk 8.6 / TIP 171 gitk: update win32 scrolling for Tk 8.6 / TIP 171 gitk: mousewheel scrolling functions for Tk 8.6 gitk: wheel scrolling multiplier preference gitk: separate x11 / win32 / aqua Mouse bindings gitk: remove non-ttk support code gitk: replace ${NS} with ttk gitk: always use themed Tk (ttk) gitk: use $config_variables as list for save/restore gitk: remove implementations for Tcl/Tk < 8.6 gitk: Make TclTk 8.6 the minimum, allow 8.7 gitk: remove code targeting git <= 1.7.2 gitk: require git >= 2.20
2025-07-22Merge branch 'mr/sort-refs-by-type'Johannes Sixt
* mr/sort-refs-by-type: gitk: separate upstream refs when using the sort-by-type option gitk: make 'sort-refs-by-type' optional and persistent gitk: sort by ref type on the 'tags and heads' view
2025-07-22Merge branch 'ti/support-sha256'Johannes Sixt
* ti/support-sha256: gitk: Add support of SHA256 repositories
2025-07-22docs: explain how to use `git imap-send --list` command to get a list of ↵Aditya Garg
available folders The output `git imap-send --list` command can be a bit confusing for new users since the IMAP LIST command output is very verbose. Help such users to analyse the same by using an example output. Signed-off-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-22Merge branch 'ml/abandon-old-versions'Johannes Sixt
* ml/abandon-old-versions: git-gui: eliminate _search_exe git-gui: remove procs gitexec and _git_cmd git-gui: use dashless 'git cmd' form for read/write git-gui: default to full copy for linked worktrees git-gui: use git-clone git-gui: remove unused git-version git-gui: use git_init to create new repository dir git-gui: git-remote is always available git-gui: git merge understands --strategy=recursive git-gui: git-diff knows submodules and textconv git-gui: git-blame understands -w and textconv git-gui: git rev-parse knows show_toplevel git-gui: use git-branch --show-current git-gui: git-diff-index always knows submodules git-gui: git ls-files knows --exclude-standard git-gui: require git >= 2.36 Signed-off-by: Johannes Sixt <j6t@kdbg.org>