Commit Graph

78008 Commits (seen)

Author SHA1 Message Date
Junio C Hamano da6c10c8cc Merge branch 'jt/switch-restore-no-longer-experimental' into seen
Declare that "git switch" and "git restore" are no longer
experimental.

* jt/switch-restore-no-longer-experimental:
  builtin: unmark git-switch and git-restore as experimental
  builtin: remove merge short flag for switch and restore
2025-07-25 09:47:11 -07:00
Junio C Hamano a20cafdaf9 Merge branch 'lo/repo-info' into seen
A new subcommand "git repo" gives users a way to grab various
repository characteristics.

* lo/repo-info:
  repo: add the --format flag
  repo: add field layout.shallow
  repo: add field layout.bare
  repo: add the field references.format
  repo: declare the repo command
2025-07-25 09:47:11 -07:00
Junio C Hamano 48810a4719 Merge branch 'ds/sparse-checkout-clean' into seen
"git sparse-checkout" subcommand learned a new "clean" action to
prune otherwise unused working-tree files that are outside the
areas of interest.

* ds/sparse-checkout-clean:
  sparse-checkout: make 'clean' clear more files
  t: expand tests around sparse merges and clean
  sparse-index: point users to new 'clean' action
  sparse-checkout: add --verbose option to 'clean'
  dir: add generic "walk all files" helper
  sparse-checkout: match some 'clean' behavior
  sparse-checkout: add basics of 'clean' command
  sparse-checkout: remove use of the_repository
2025-07-25 09:47:10 -07:00
Junio C Hamano 0acabc0e4b Merge branch 'ac/deglobal-sparse-variables' into seen
Two global variables related to sparse checkout have been moved to
the repository settings structure.

Ready?

* ac/deglobal-sparse-variables:
  environment: remove the global variable 'sparse_expect_files_outside_of_patterns'
  environment: move access to "core.sparsecheckoutcone" into repo_settings
  environment: move access to "core.sparsecheckout" into repo_settings
2025-07-25 09:47:10 -07:00
Junio C Hamano 4cc196ca6e Merge branch 'kj/renamed-submodule' into seen
The case where a new submodule takes a path where used to be a
completely different subproject is now dealt a bit better than
before.

Looking good.

* kj/renamed-submodule:
  fixup! submodule: skip redundant active entries when pattern covers path
  fixup! submodule: prevent overwriting .gitmodules on path reuse
  submodule: skip redundant active entries when pattern covers path
  submodule: prevent overwriting .gitmodules on path reuse
2025-07-25 09:47:09 -07:00
Junio C Hamano 70bcc95cee Merge branch 'tc/last-modified' into seen
A new command "git last-modified" is proposed to show the closest
ancestor commit that touched each path.

* tc/last-modified:
  fixup! last-modified: support --extended format
  last-modified: support --extended format
  pretty: allow caller to disable indentation
  last-modified: use Bloom filters when available
  t/perf: add last-modified perf script
  last-modified: new subcommand to show when files were last modified
2025-07-25 09:47:08 -07:00
Junio C Hamano c67fdf5848 Merge branch 'pw/3.0-commentchar-auto-deprecation' into seen
Proposes to deprecate "core.commentChar=auto" that attempts to
dynamically pick a suitable comment character, as it is too much
trouble to support for little benefit.

* pw/3.0-commentchar-auto-deprecation:
  commit: print advice when core.commentString=auto
  breaking-changes: deprecate support for core.commentString=auto
2025-07-25 09:47:07 -07:00
Junio C Hamano 73ff1fca05 Merge branch 'ps/object-file-wo-the-repository' into seen
Reduce implicit assumption and dependence on the_repository in the
object-file subsystem.

Comments?

* ps/object-file-wo-the-repository:
  object-file: get rid of `the_repository` in index-related functions
  object-file: get rid of `the_repository` in `force_object_loose()`
  object-file: get rid of `the_repository` in `read_loose_object()`
  object-file: get rid of `the_repository` in loose object iterators
  object-file: remove declaration for `for_each_file_in_obj_subdir()`
  object-file: inline `for_each_loose_file_in_objdir_buf()`
  object-file: get rid of `the_repository` when writing objects
  odb: introduce `odb_write_object()`
  loose: write loose objects map via their source
  object-file: get rid of `the_repository` in `finalize_object_file()`
  object-file: get rid of `the_repository` in `loose_object_info()`
  object-file: get rid of `the_repository` when freshening objects
  object-file: inline `check_and_freshen()` functions
  object-file: get rid of `the_repository` in `has_loose_object()`
  object-file: stop using `the_hash_algo`
  object-file: fix -Wsign-compare warnings
2025-07-25 09:47:06 -07:00
Junio C Hamano 8bbd44b3e9 Merge branch 'cc/promisor-remote-capability' into seen
The "promisor-remote" capability mechanism has been updated to
allow the "partialCloneFilter" settings and the "token" value to be
communicated from the server side.

* cc/promisor-remote-capability:
  promisor-remote: use string constants for 'name' and 'url' too
  promisor-remote: allow a client to check fields
  promisor-remote: refactor how we parse advertised fields
  promisor-remote: allow a server to advertise more fields
  promisor-remote: refactor to get rid of 'struct strvec'
2025-07-25 09:47:05 -07:00
Junio C Hamano bcdf9ae57e Merge branch 'en/ort-rename-fixes' into seen
Various bugs about rename handling in "ort" merge strategy have
been fixed.

Comments?

* en/ort-rename-fixes:
  merge-ort: fix directory rename on top of source of other rename/delete
  merge-ort: fix incorrect file handling
  t6423: fix missed staging of file in testcases 12i,12j,12k
  t6423: document two bugs with rename-to-self testcases
  merge-ort: drop unnecessary temporary in check_for_directory_rename()
  merge-ort: update comments to modern testfile location
2025-07-25 09:47:04 -07:00
Junio C Hamano 0ac7363f9d Merge branch 'ps/reflog-migrate-fixes' into seen
"git refs migrate" to migrate the reflog entries from a refs
backend to another had a handful of bugs squashed.

* ps/reflog-migrate-fixes:
  refs: fix invalid old object IDs when migrating reflogs
  refs: stop unsetting REF_HAVE_OLD for log-only updates
  refs: fix identity for migrated reflogs
  ident: fix type of string length parameter
  builtin/reflog: implement subcommand to write new entries
  refs: export `ref_transaction_update_reflog()`
  builtin/reflog: improve grouping of subcommands
  Documentation/git-reflog: convert to use synopsis type
2025-07-25 09:46:50 -07:00
Patrick Steinhardt de7cc0782a refs: fix invalid old object IDs when migrating reflogs
When migrating reflog entries between different storage formats we end
up with invalid old object IDs for the migrated entries: instead of
writing the old object ID of the to-be-migrated entry, we end up with
the all-zeroes object ID.

The root cause of this issue is that we don't know to use the old object
ID provided by the caller. Instead, we manually resolve the old object
ID by resolving the current value of its matching reference. But as that
reference does not yet exist in the target ref storage we always end up
resolving it to all-zeroes.

This issue got unnoticed as there is no user-facing command that would
even show the old object ID. While `git log -g` knows to show the new
object ID, we don't have any formatting directive to show the old object
ID.

Fix the bug by introducing a new flag `REF_LOG_USE_PROVIDED_OIDS`. If
set, backends are instructed to use the old and new object IDs provided
by the caller, without doing any manual resolving. Set this flag in
`ref_transaction_update_reflog()`.

Amend our tests in t1460-refs-migrate to use our test tool to read
reflog entries. This test tool prints out both old and new object ID of
each reflog entry, which fixes the test gap. Furthermore it also prints
the full identity used to write the reflog, which provides test coverage
for the previous commit in this patch series that fixed the identity for
migrated reflogs.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:51 -07:00
Patrick Steinhardt 2db0b1a115 refs: stop unsetting REF_HAVE_OLD for log-only updates
The `REF_HAVE_OLD` flag indicates whether a given ref update has its old
object ID set. If so, the value of that field is used to verify whether
the current state of the reference matches this expected state. It is
thus an important part of mitigating races with a concurrent process
that updates the same set of references.

When writing reflogs though we explicitly unset that flag. This is a
sensible thing to do: the old state of reflog entry updates may not
necessarily match the current on-disk state of its accompanying ref, but
it's only intended to signal what old object ID we want to write into
the new reflog entry. For example when migrating refs we end up writing
many reflog entries for a single reference, and most likely those reflog
entries will have many different old object IDs.

But unsetting this flag also removes a useful signal, namely that the
caller _did_ provide an old object ID for a given reflog entry. This
signal will become useful in a subsequent commit, where we add a new
flag that tells the transaction to use the provided old and new object
IDs to write a reflog entry. The `REF_HAVE_OLD` flag is then used as a
signal to verify that the caller really did provide an old object ID.

Stop unsetting the flag so that we can use it as this described signal
in a subsequent commit. Skip checking the old object ID for log-only
updates so that we don't expect it to match the current on-disk state.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:51 -07:00
Patrick Steinhardt da84f24efe refs: fix identity for migrated reflogs
When migrating reflog entries between different storage formats we must
reconstruct the identity of reflog entries. This is done by passing the
committer passed to the `migrate_one_reflog_entry()` callback function
to `fmt_ident()`.

This results in an invalid identity though: `fmt_ident()` expects the
caller to provide both name and mail of the author, but we pass the full
identity as mail. This leads to an identity like:

    pks <Patrick Steinhardt ps@pks.im>

Fix the bug by splitting the identity line first. This allows us to
extract both the name and mail so that we can pass them to `fmt_ident()`
separately.

This commit does not yet add any tests as there is another bug in the
reflog migration that will be fixed in a subsequent commit. Once that
bug is fixed we'll make the reflog verification in t1450 stricter, and
that will catch both this bug here and the other bug.

Note that we also add two new `name` and `mail` string buffers to the
callback structures and splice them through to the callbacks. This is
done so that we can avoid allocating a new buffer every time we compute
the committer information.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:51 -07:00
Patrick Steinhardt d82bbc9924 ident: fix type of string length parameter
The last parameter in `split_ident_line()` is the length of the line
passed in by the caller. As such, most callers pass in either the result
of `strlen()`, `struct strbuf::len` or a pointer diff, all of which
are expected to be positive numbers. Regardless of that, the function
accepts a signed integer, which is somewhat confusing.

Fix the function signature to instead accept a `size_t`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:50 -07:00
Patrick Steinhardt d035bc15bc builtin/reflog: implement subcommand to write new entries
While we provide a couple of subcommands in git-reflog(1) to remove
reflog entries, we don't provide any to write new entries. Obviously
this is not an operation that really would be needed for many use cases
out there, or otherwise people would have complained that such a command
does not exist yet. But the introduction of the "reftable" backend
changes the picture a bit, as it is now basically impossible to manually
append a reflog entry if one wanted to do so due to the binary format.

Plug this gap by introducing a simple "write" subcommand. For now, all
this command does is to append a single new reflog entry with the given
object IDs and message to the reflog. More specifically, it is not yet
possible to:

  - Write multiple reflog entries at once.

  - Insert reflog entries at arbitrary indices.

  - Specify the date of the reflog entry.

  - Insert reflog entries that refer to nonexistent objects.

If required, those features can be added at a future point in time. For
now though, the new command aims to fulfill the most basic use cases
while being as strict as possible when it comes to verifying parameters.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:50 -07:00
Patrick Steinhardt 55c3f3f855 refs: export `ref_transaction_update_reflog()`
In a subsequent commit we'll add another user that wants to write reflog
entries. This requires them to call `ref_transaction_update_reflog()`,
but that function is local to "refs.c".

Export the function to prepare for the change. While at it, drop the
`flags` field, as all callers are for now expected to use the same flags
anyway.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:50 -07:00
Patrick Steinhardt d2d03570c4 builtin/reflog: improve grouping of subcommands
The way subcommands of git-reflog(1) are laid out does not make any
immediate sense. Reorder them such that read-only subcommands precede
writing commands for a bit more structure.

Furthermore, move the "expire" subcommand last. This prepares for a
subsequent change where we are about to introduce a new "write" command
to append reflog entries. Like this, the writing subcommands are ordered
such that those affecting a single reflog come before those spanning
across all reflogs.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:50 -07:00
Patrick Steinhardt d3556ee0ef Documentation/git-reflog: convert to use synopsis type
With 974cdca345 (doc: introduce a synopsis typesetting, 2024-09-24) we
have introduced a new synopsis type that simplifies the rules for
typesetting a command's synopsis. Convert the git-reflog(1)
documentation to use it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-25 09:25:49 -07:00
Junio C Hamano 2aced5b3c6 Merge branch 'lm/add-p-context' into jch
"git add/etc -p" now honors diff.context configuration variable,
and learns to honor -U<n> option.

* lm/add-p-context:
  fixup! add-patch: add diff.context command line overrides
  add-patch: add diff.context command line overrides
  add-patch: respect diff.context configuration
  t: use test_config in t4055
  t: use test_grep in t3701 and t4055
2025-07-24 16:04:41 -07:00
Junio C Hamano 0c692f1d08 Merge branch 'tb/prepare-midx-pack-cleanup' into jch
Improvement on Multi-pack-index API.

* tb/prepare-midx-pack-cleanup:
  midx: return a `packed_git` pointer from `prepare_midx_pack()`
  midx-write.c: extract inner loop from fill_packs_from_midx()
  midx-write.c: guard against incremental MIDXs in want_included_pack()
  midx: access pack names through `nth_midxed_pack_name()`
2025-07-24 16:04:40 -07:00
Junio C Hamano 9685339ed5 Merge branch 'ps/config-wo-the-repository' into jch
The config API had a set of convenience wrapper functions that
implicitly use the_repository instance; they have been removed and
inlined at the calling sites.

* ps/config-wo-the-repository: (21 commits)
  config: fix sign comparison warnings
  config: move Git config parsing into "environment.c"
  config: remove unused `the_repository` wrappers
  config: drop `git_config_set_multivar()` wrapper
  config: drop `git_config_get_multivar_gently()` wrapper
  config: drop `git_config_set_multivar_in_file_gently()` wrapper
  config: drop `git_config_set_in_file_gently()` wrapper
  config: drop `git_config_set()` wrapper
  config: drop `git_config_set_gently()` wrapper
  config: drop `git_config_set_in_file()` wrapper
  config: drop `git_config_get_bool()` wrapper
  config: drop `git_config_get_ulong()` wrapper
  config: drop `git_config_get_int()` wrapper
  config: drop `git_config_get_string()` wrapper
  config: drop `git_config_get_string()` wrapper
  config: drop `git_config_get_string_multi()` wrapper
  config: drop `git_config_get_value()` wrapper
  config: drop `git_config_get_value()` wrapper
  config: drop `git_config_get()` wrapper
  config: drop `git_config_clear()` wrapper
  ...
2025-07-24 16:04:40 -07:00
Junio C Hamano 9f09b67520 Merge branch 'kn/for-each-ref-skip' into jch
"git for-each-ref" learns "--skip-until" option to help
applications that want to page its output.

* kn/for-each-ref-skip:
  ref-filter: use REF_ITERATOR_SEEK_SET_PREFIX instead of '1'
  t6302: add test combining '--start-after' with '--exclude'
  for-each-ref: reword the documentation for '--start-after'
  for-each-ref: fix documentation argument ordering
  ref-cache: use 'size_t' instead of int for length
  ref-cache: set prefix_state when seeking
2025-07-24 16:04:38 -07:00
Junio C Hamano edcb2ac092 Merge branch 'ag/send-email-imap-sent' into jch
"git send-email" learned to drive "git imap-send" to store already
sent e-mails in an IMAP folder.

A reroll (v4) exists.
cf. <PN3PR01MB9597EC4C5DF97943587AEEB4B85FA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>

* ag/send-email-imap-sent:
  send-email: add ability to send a copy of sent emails to an IMAP folder
2025-07-24 16:04:38 -07:00
Junio C Hamano b051ee6940 Merge branch 'hl/test-helper-fd-close' into jch
A few file descriptors left unclosed upon program completion in a
few test helper programs are now closed.

* hl/test-helper-fd-close:
  test-delta: close output descriptor after use
  test-delta: use strbufs to hold input files
  test-delta: handle errors with die()
  t/helper/test-truncate: close file descriptor after truncation
2025-07-24 16:04:37 -07:00
Junio C Hamano 1fbc5dcb98 Merge branch 'ow/rebase-verify-insn-fmt-before-initializing-state' into jch
"git rebase -i" with bogus rebase.instructionFormat configuration
failed to produce the todo file after recording the state files,
leading to confused "git status"; this has been corrected.

* ow/rebase-verify-insn-fmt-before-initializing-state:
  rebase: write script before initializing state
2025-07-24 16:04:37 -07:00
Junio C Hamano 7ea15eb372 Merge branch 'ps/object-store-midx' into jch
Redefine where the multi-pack-index sits in the object subsystem,
which recently was restructured to allow multiple backends that
support a single object source that belongs to one repository.  A
midx does span mulitple "object sources".

* ps/object-store-midx:
  midx: remove now-unused linked list of multi-pack indices
  packfile: stop using linked MIDX list in `get_all_packs()`
  packfile: stop using linked MIDX list in `find_pack_entry()`
  packfile: refactor `get_multi_pack_index()` to work on sources
  midx: stop using linked list when closing MIDX
  packfile: refactor `prepare_packed_git_one()` to work on sources
  midx: start tracking per object database source
2025-07-24 16:04:36 -07:00
Junio C Hamano 291230c4f9 ### match next 2025-07-24 16:04:36 -07:00
Junio C Hamano 987594b37f Merge branch 'sk/reftable-clarify-tests' into jch
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-07-24 16:04:35 -07:00
Junio C Hamano 634177275a Merge branch 'ly/pull-autostash' into jch
"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-07-24 16:04:35 -07:00
Junio C Hamano 3b3b32841c Merge branch 'jc/document-test-balloons-in-flight' into jch
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-07-24 16:04:34 -07:00
Junio C Hamano 49d48f39d6 Merge branch 'ag/imap-send-list-folders-doc' into jch
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-07-24 16:04:34 -07:00
Junio C Hamano 7514c8d3d8 Merge branch 'cb/meson-avoid-broken-macos-pcre2' into jch
Build fix for macOS.

* cb/meson-avoid-broken-macos-pcre2:
  meson: work around broken system PCRE2 dependency in macOS
2025-07-24 16:04:33 -07:00
Junio C Hamano 78fcde9e1c Merge branch 'jb/t7510-gpg-program-path' into jch
A new test to ensure that a recent change will keep working.

* jb/t7510-gpg-program-path:
  t7510: add test cases for non-absolute gpg program
2025-07-24 16:04:33 -07:00
Junio C Hamano e53d0e8d95 Merge branch 'jc/ci-print-test-failures-fix' into jch
CI fix.

* jc/ci-print-test-failures-fix:
  ci: allow github-actions print test failures again
2025-07-24 16:04:32 -07:00
Junio C Hamano e920b62369 Merge branch 'kn/for-each-ref-skip' (early part) into jch
* 'kn/for-each-ref-skip' (early part):
  for-each-ref: introduce a '--start-after' option
  ref-filter: remove unnecessary else clause
  refs: selectively set prefix in the seek functions
  ref-cache: remove unused function 'find_ref_entry()'
  refs: expose `ref_iterator` via 'refs.h'
2025-07-24 16:04:31 -07:00
Junio C Hamano bd2ca1c5c4 Merge branch 'jk/unleak-reflog-expire-entry' into jch
Leakfix.

* jk/unleak-reflog-expire-entry:
  reflog: close leak of reflog expire entry
2025-07-24 16:04:30 -07:00
Junio C Hamano 00f9c48938 Merge branch 'jc/do-not-scan-argv-without-parsing' into jch
Update a hard-to-read in-code NEEDSWORK comment.

* jc/do-not-scan-argv-without-parsing:
  rev-list: update a NEEDSWORK comment
2025-07-24 16:04:30 -07:00
Junio C Hamano d6ee8835db Merge branch 'jk/revision-no-early-output' into jch
Remove unsupported, unused, and unsupportable old option from "git
log".

* jk/revision-no-early-output:
  revision: drop early output option
2025-07-24 16:04:29 -07:00
Junio C Hamano a0eaee602b Merge branch 'jc/rev-list-info-cleanup' into jch
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-24 16:04:29 -07:00
Junio C Hamano 057fb26e81 Merge branch 'ac/auto-comment-char-fix' into jch
"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-24 16:04:29 -07:00
Junio C Hamano 0395955f42 Merge branch 'rs/pop-recent-commit-with-prio-queue' into jch
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-24 16:04:28 -07:00
Junio C Hamano e4ef0485fd The fourteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24 16:03:57 -07:00
Junio C Hamano 422a5222f8 Merge branch 'bc/contribution-under-non-real-names'
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-24 16:03:57 -07:00
Junio C Hamano 8c7817c361 Merge branch 'rj/meson-libexecdir-fix'
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-24 16:03:57 -07:00
Junio C Hamano 42eb288158 Merge branch 'ss/compat-bswap-revamp'
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-24 16:03:56 -07:00
Junio C Hamano 0686fa4216 Merge branch 'pw/config-kvi-remove-path'
Remove a redundant member from kvi struct.

* pw/config-kvi-remove-path:
  config: remove unneeded struct field
2025-07-24 16:03:56 -07:00
Junio C Hamano 79c64ebc11 Merge branch 'kl/test-installed-fix'
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-24 16:03:56 -07:00
Junio C Hamano 5ce97021dd Merge branch 'pw/adopt-c99-bool-officially'
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-24 16:03:55 -07:00
Karthik Nayak 1085d0a0b3 ref-filter: use REF_ITERATOR_SEEK_SET_PREFIX instead of '1'
In the commit 51511d68f4 (for-each-ref: introduce a '--start-after'
option, 2025-07-15), for introducing the '--start-after' flag, the
`ref_iterator_seek()` was modified to also accept a flag. This was to
allow the function to also set the prefix when
'REF_ITERATOR_SEEK_SET_PREFIX' was set.

In `do_filter_refs()` instead of passing the flag, we pass in '1' which
is the value of the flag. While this works, this is definitely hard to
read and introduces inconsistency. Change it to use the flag.

While here, remove the unnecessary 'if (prefix)' clause in the 'else'
statement, since the block already checks for 'prefix'.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-24 15:31:58 -07:00