summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
37 hoursThe tenth batchHEADorigin/masterorigin/HEADmasterJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
37 hoursMerge branch 'pc/range-diff-memory-limit'Junio C Hamano
"git range-diff" learned a way to limit the memory consumed by O(N*N) cost matrix. * pc/range-diff-memory-limit: range-diff: add configurable memory limit for cost matrix
37 hoursMerge branch 'ne/alloc-free-and-null'Junio C Hamano
The clear_alloc_state() API function was not fully clearing the structure for reuse, but since nobody reuses it, replace it with a variant that frees the structure as well, making the callers simpler. * ne/alloc-free-and-null: alloc: fix dangling pointer in alloc_state cleanup
37 hoursMerge branch 'jk/curl-global-trace-components'Junio C Hamano
Adjust to the way newer versions of cURL selectivel enables tracing options, so that our tests can continue to work. * jk/curl-global-trace-components: curl: add support for curl_global_trace() components
37 hoursMerge branch 'ag/doc-sendmail-gmail-example-update'Junio C Hamano
Doc update. * ag/doc-sendmail-gmail-example-update: docs: update sendmail docs to use more secure SMTP server for Gmail
37 hoursMerge branch 'kn/clang-format-bitfields'Junio C Hamano
CodingGuidelines now spells out how bitfields are to be written. * kn/clang-format-bitfields: Documentation: note styling for bit fields
37 hoursMerge branch 'jc/longer-disambiguation-fix'Junio C Hamano
"git rev-parse --short" and friends failed to disambiguate two objects with object names that share common prefix longer than 32 characters, which has been fixed. * jc/longer-disambiguation-fix: abbrev: allow extending beyond 32 chars to disambiguate
37 hoursMerge branch 'sg/line-log-boundary-fixes'Junio C Hamano
A corner case bug in "git log -L..." has been corrected. * sg/line-log-boundary-fixes: line-log: show all line ranges touched by the same diff range line-log: fix assertion error
37 hoursMerge branch 'jc/doc-includeif-hasconfig-remote-url-fix'Junio C Hamano
Doc mark-up fix. * jc/doc-includeif-hasconfig-remote-url-fix: config: document includeIf conditions consistently
37 hoursMerge branch 'ag/send-email-imap-sent'Junio C Hamano
"git send-email" learned to drive "git imap-send" to store already sent e-mails in an IMAP folder. * ag/send-email-imap-sent: send-email: enable copying emails to an IMAP folder without actually sending them send-email: add ability to send a copy of sent emails to an IMAP folder
37 hoursMerge branch 'pw/3.0-commentchar-auto-deprecation'Junio C Hamano
"core.commentChar=auto" that attempts to dynamically pick a suitable comment character is non-workable, as it is too much trouble to support for little benefit, and is marked as deprecated. * pw/3.0-commentchar-auto-deprecation: commit: print advice when core.commentString=auto config: warn on core.commentString=auto breaking-changes: deprecate support for core.commentString=auto
37 hoursMerge branch 'kh/doc-fast-import-markup-fix'Junio C Hamano
Doc mark-up fix. * kh/doc-fast-import-markup-fix: doc: fast-import: replace literal block with paragraph
3 daysmailmap: consolidate multiple addresses into oneGreg Hurrell
Merges contributions made from three different addresses: - win@wincent.com (old address, initial contributions in 2007–2009) - greg@hurrell.net (personal address matching full name, so this one is the "forever" address; contributions made starting in 2018) - greg.hurrell@datadoghq.com (current work address, used for recent contributions) Signed-off-by: Greg Hurrell <greg.hurrell@datadoghq.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 daysThe ninth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 daysMerge branch 'mm/worktree-doc-typofix'Junio C Hamano
Docfix. * mm/worktree-doc-typofix: docs: fix typo in worktree.adoc 'extension'
5 daysMerge branch 'rs/object-name-extend-abbrev-len-update'Junio C Hamano
Code clean-up. * rs/object-name-extend-abbrev-len-update: object-name: declare pointer type of extend_abbrev_len()'s 2nd parameter
5 daysMerge branch 'ps/upload-pack-oom-protection'Junio C Hamano
A broken or malicious "git fetch" can say that it has the same object for many many times, and the upload-pack serving it can exhaust memory storing them redundantly, which has been corrected. * ps/upload-pack-oom-protection: upload-pack: don't ACK non-commits repeatedly in protocol v2 t5530: modernize tests
5 daysMerge branch 'ds/midx-write-fixes'Junio C Hamano
Fixes multiple crashes around midx write-out codepaths. * ds/midx-write-fixes: midx-write: simplify error cases midx-write: reenable signed comparison errors midx-write: use uint32_t for preferred_pack_idx midx-write: use cleanup when incremental midx fails midx-write: put failing response value back midx-write: only load initialized packs
5 daysMerge branch 'lo/repo-info-step-2'Junio C Hamano
"repo info" learns a short-hand option "-z" that is the same as "--format=nul", and learns to report the objects format used in the repository. * lo/repo-info-step-2: repo: add the field objects.format repo: add the flag -z as an alias for --format=nul
5 daysMerge branch 'jt/de-global-bulk-checkin'Junio C Hamano
The bulk-checkin code used to depend on a file-scope static singleton variable, which has been updated to pass an instance throughout the callchain. * jt/de-global-bulk-checkin: bulk-checkin: use repository variable from transaction bulk-checkin: require transaction for index_blob_bulk_checkin() bulk-checkin: remove global transaction state bulk-checkin: introduce object database transaction structure
8 daysThe eighth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 daysMerge branch 'rs/describe-with-lazy-queue-and-oidset'Junio C Hamano
Instead of scanning for the remaining items to see if there are still commits to be explored in the queue, use khash to remember which items are still on the queue (an unacceptable alternative is to reserve one object flag bits). * rs/describe-with-lazy-queue-and-oidset: describe: use oidset in finish_depth_computation()
8 daysMerge branch 'tc/t0450-harden'Junio C Hamano
Test updates. * tc/t0450-harden: t0450: add allowlist for builtins with missing .adoc t0450: fix test for out-of-tree builds
8 daysMerge branch 'kh/doc-markup-fixes'Junio C Hamano
Doc markup fixes. * kh/doc-markup-fixes: doc: remove extra backtick for inline-verbatim doc: add missing backtick for inline-verbatim
8 daysMerge branch 'km/alias-doc-markup-fix'Junio C Hamano
Docfix. * km/alias-doc-markup-fix: doc: fix formatting of function-wrap shell alias
8 daysMerge branch 'ps/gitlab-ci-disable-windows-monitoring'Junio C Hamano
Windows "real-time monitoring" interferes with the execution of tests and affects negatively in both correctness and performance, which has been disabled in Gitlab CI. * ps/gitlab-ci-disable-windows-monitoring: gitlab-ci: disable realtime monitoring to unbreak Windows jobs
8 daysMerge branch 'ms/refs-exists'Junio C Hamano
"git refs exists" that works like "git show-ref --exists" has been added. * ms/refs-exists: t: add test for git refs exists subcommand t1422: refactor tests to be shareable t1403: split 'show-ref --exists' tests into a separate file builtin/refs: add 'exists' subcommand
8 daysMerge branch 'ps/object-store-midx-dedup-info'Junio C Hamano
Further code clean-up for multi-pack-index code paths. * ps/object-store-midx-dedup-info: midx: compute paths via their source midx: stop duplicating info redundant with its owning source midx: write multi-pack indices via their source midx: load multi-pack indices via their source midx: drop redundant `struct repository` parameter odb: simplify calling `link_alt_odb_entry()` odb: return newly created in-memory sources odb: consistently use "dir" to refer to alternate's directory odb: allow `odb_find_source()` to fail odb: store locality in object database sources
8 daysMerge branch 'je/doc-add'Junio C Hamano
Documentation for "git add" has been updated. * je/doc-add: doc: rephrase the purpose of the staging area doc: git-add: simplify discussion of ignored files doc: git-add: clarify intro & add an example
9 daysdoc: fast-import: replace literal block with paragraphKristoffer Haugsbakk
68061e34702 (fast-import: disallow "feature export-marks" by default, 2019-08-29) added the documentation for this option. The second paragraph is a literal block but it looks like it should just be a regular paragraph. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 daysMerge branch 'master' of https://github.com/j6t/git-guiJunio C Hamano
* 'master' of https://github.com/j6t/git-gui: git-gui: sync Makefiles with git.git git-gui: fix error handling of Revert Changes command git-gui--askyesno (mingw): use Git for Windows' icon, if available git-gui--askyesno: allow overriding the window title git gui: set GIT_ASKPASS=git-gui--askpass if not set yet git-gui: provide question helper for retry fallback on Windows git-gui: simplify using nice(1) git-gui: simplify PATH de-duplication
9 daysMerge branch 'master' of https://github.com/j6t/gitkJunio C Hamano
* 'master' of https://github.com/j6t/gitk: gitk: add README with usage, build, and contribution details gitk: fix trackpad scrolling for Tcl/Tk 8.7+ gitk: use <Button-3> for ctx menus on macOS with Tcl 8.7+
11 daysThe seventh batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 daysMerge branch 'tc/last-modified'Junio C Hamano
A new command "git last-modified" has been added to show the closest ancestor commit that touched each path. * tc/last-modified: 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
11 daysMerge branch 'ds/ls-files-lazy-unsparse'Junio C Hamano
"git ls-files <pathspec>..." should not necessarily have to expand the index fully if a sparsified directory is excluded by the pathspec; the code is taught to expand the index on demand to avoid this. * ds/ls-files-lazy-unsparse: ls-files: conditionally leave index sparse
11 daysMerge branch 'ds/path-walk-repack-fix'Junio C Hamano
"git repack --path-walk" lost objects in some corner cases, which has been corrected. * ds/path-walk-repack-fix: path-walk: create initializer for path lists path-walk: fix setup of pending objects
11 daysMerge branch 'am/xdiff-hash-tweak'Junio C Hamano
Inspired by Ezekiel's recent effort to showcase Rust interface, the hash function implementation used to hash lines have been updated to the one used for ELF symbol lookup by Glibc. * am/xdiff-hash-tweak: xdiff: optimize xdl_hash_record_verbatim xdiff: refactor xdl_hash_record()
11 daysMerge branch 'da/cargo-serialize'Junio C Hamano
Makefile tried to run multiple "cargo build" which would not work very well; serialize their execution to work it around. * da/cargo-serialize: Makefile: build libgit-rs and libgit-sys serially
14 daysgit-gui: sync Makefiles with git.gitAdam Dinwoodie
In git.git, commit 5309c1e9fb39 (Makefile: set default goals in makefiles, 2025-02-15) touched two Makefiles in the git-git/ directory. Import these changes, so that the trees can converge again with the next merge of this repository into git.git. Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
14 daysMerge branch 'ml/misc-simplifications'Johannes Sixt
* ml/misc-simplifications: git-gui: simplify using nice(1) git-gui: simplify PATH de-duplication
14 daysMerge branch 'js/ask-yesno'Johannes Sixt
* js/ask-yesno: git-gui--askyesno (mingw): use Git for Windows' icon, if available git-gui--askyesno: allow overriding the window title git gui: set GIT_ASKPASS=git-gui--askpass if not set yet git-gui: provide question helper for retry fallback on Windows Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2025-09-05upload-pack: don't ACK non-commits repeatedly in protocol v2Patrick Steinhardt
When a client performs a fetch or clone they can optionally send "have" lines to tell the server which objects they already have available locally. These object IDs are stored by the server in an object array so that it can remember any objects it doesn't have to include in the pack sent to the client. While there isn't any reason to do so, clients are free to send the same "have" line repeatedly. git-upload-pack(1) already knows to handle this well: every commit it has seen via a "have" line gets marked with the `THEY_HAVE` flag, and if such a commit is seen repeatedly we know to not process it another time. This also has the effect that we only store the object ID once, only, in the `have_obj` array. There is an edge case though: if the client sends an object ID that does not refer to a commit we neither store nor check the `THEY_HAVE` flag. This means that we repeatedly store the same object ID in our `have_obj` array, with two consequences: - In protocol v2 we deduplicate ACKs for commits, but not for any other objects as we send ACKs for every object ID in the `have_obj` array. - The `have_obj` array can grow in size indefinitely with both protocols. The potentially-more-serious issue is the second one, as we basically have a way for an adversary to allocate arbitrarily large buffers now. Ultimately, this doesn't seem to be all that serious though: on my machine, the growth of that array is at around 4MB/s, and after roughly five minutes I was only at 1GB RSS. So this is concerning, but only mildly so. Fix this bug by storing the `THEY_HAVE` flag independent of the object type so that we don't store duplicate object IDs in `have_obj` anymore. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-05t5530: modernize testsPatrick Steinhardt
Refactor tests to follow modern best practices: - Merge together tests that set up and verify a single use case. - Drop empty newlines at the beginning and end of test bodies. - Don't change directories in the main test body. - Remove an unused `D` variable. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-05midx-write: simplify error casesDerrick Stolee
The write_midx_internal() method uses gotos to jump to a cleanup section to clear memory before returning 'result'. Since these jumps are more common for error conditions, initialize 'result' to -1 and then only set it to 0 before returning with success. There are a couple places where we return with success via a jump. This has the added benefit that the method now returns -1 on error instead of an inconsistent 1 or -1. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-05midx-write: reenable signed comparison errorsDerrick Stolee
Remove the remaining signed comparison warnings in midx-write.c so that they can be enforced as errors in the future. After the previous change, the remaining errors are due to iterator variables named 'i'. The strategy here involves defining the variable within the for loop syntax to make sure we use the appropriate bitness for the loop sentinel. This matters in at least one method where the variable was compared to uint32_t in some loops and size_t in others. While adjusting these loops, there were some where the loop boundary was checking against a uint32_t value _plus one_. These were replaced with non-strict comparisons, but also the value is checked to not be UINT32_MAX. Since the value is the number of incremental multi-pack- indexes, this is not a meaningful restriction. The new die() is about defensive programming more than it being realistically possible. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-05midx-write: use uint32_t for preferred_pack_idxDerrick Stolee
midx-write.c has the DISABLE_SIGN_COMPARE_WARNINGS macro defined for a few reasons, but the biggest one is the use of a signed preferred_pack_idx member inside the write_midx_context struct. The code currently uses -1 to indicate an unset preferred pack but pack int ids are normally handled as uint32_t. There are also a few loops that search for the preferred pack by name and those iterators will need updates to uint32_t in the next change. For now, replace the use of -1 with a 'NO_PREFERRED_PACK' macro and an equality check. The macro stores the max value of a uint32_t, so we cannot store a preferred pack that appears last in a list of 2^32 total packs, but that's expected to be unreasonable already. Furthermore, with this change we end up extending the range from 2^31 possible packs to 2^32-1. There are some careful things to worry about with initializing the preferred pack in the struct and using that value when searching for a preferred pack that was already incorrect but accidentally working when the index was initialized to zero. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-05midx-write: use cleanup when incremental midx failsDerrick Stolee
The incremental mode of writing a multi-pack-index has a few extra conditions that could lead to failure, but these are currently short-ciruiting with 'return -1' instead of setting the method's 'result' variable and going to the cleanup tag. Replace these returns with gotos to avoid memory issues when exiting early due to error conditions. Unfortunately, these error conditions are difficult to reproduce with test cases, which is perhaps one reason why the memory loss was not caught by existing test cases in memory tracking modes. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-05midx-write: put failing response value backDerrick Stolee
This instance of setting the result to 1 before going to cleanup was accidentally removed in fcb2205b77 (midx: implement support for writing incremental MIDX chains, 2024-08-06). Build upon a test that already deletes a packfile to verify that this error propagates to full command failure. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-05midx-write: only load initialized packsDerrick Stolee
The fill_packs_from_midx() method was refactored in fcb2205b77 (midx: implement support for writing incremental MIDX chains, 2024-08-06) to allow for preferred packfiles and incremental multi-pack-indexes. However, this led to some conditions that can cause improperly initialized memory in the context's list of packfiles. The conditions caring about the preferred pack name or the incremental flag are currently necessary to load a packfile. But the context is still being populated with pack_info structs based on the packfile array for the existing multi-pack-index even if prepare_midx_pack() isn't called. Add a new test that breaks under --stress when compiled with SANITIZE=address. The chosen number of 100 packfiles was selected to get the --stress output to fail about 50% of the time, while 50 packfiles could not get a failure in most --stress runs. The test case is marked as EXPENSIVE not only because of the number of packfiles it creates, but because some CI environments were reporting errors during the test that I could not reproduce, specifically around being unable to open the packfiles or their pack-indexes. When it fails under SANITIZE=address, it provides the following error: AddressSanitizer:DEADLYSIGNAL ================================================================= ==3263517==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000027 ==3263517==The signal is caused by a READ memory access. ==3263517==Hint: address points to the zero page. #0 0x562d5d82d1fb in close_pack_windows packfile.c:299 #1 0x562d5d82d3ab in close_pack packfile.c:354 #2 0x562d5d7bfdb4 in write_midx_internal midx-write.c:1490 #3 0x562d5d7c7aec in midx_repack midx-write.c:1795 #4 0x562d5d46fff6 in cmd_multi_pack_index builtin/multi-pack-index.c:305 ... This failure stack trace is disconnected from the real fix because the bad pointers are accessed later when closing the packfiles from the context. There are a few different aspects to this fix that are worth noting: 1. We return to the previous behavior of fill_packs_from_midx to not rely on the incremental flag or existence of a preferred pack. 2. The behavior to scan all layers of an incremental midx is kept, so this is not a full revert of the change. 3. We skip allocating more room in the pack_info array if the pack fails prepare_midx_pack(). 4. The method has always returned 0 for success and 1 for failure, but the condition checking for error added a check for a negative result for failure, so that is now updated. 5. The call to open_pack_index() is removed, but this is needed later in the case of a preferred pack. That call is moved to immediately before its result is needed (checking for the object count). Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-04alloc: fix dangling pointer in alloc_state cleanupノウラ | Flare
All callers of clear_alloc_state() immediately free what they cleared, so currently it does not hurt anybody that the alloc_state is left in an unreusable state, but it is an error-prone API. Replace it with a new function that clears but in addition frees the structure, as well as NULLing the pointer that points at it and adjust existing callers. As it is a moral equivalent of FREE_AND_NULL(), except that what it frees has internal structure that needs to be cleaned, allow the helper to be called twice in a row, by making a call with a pointer to a pointer variable that already is NULLed. While at it, rename allocate_alloc_state() and name the new function alloc_state_free_and_null(), to follow more closely the function naming convention specified in the CodingGuidelines (namely, functions about S are named with S_ prefix and then verb). Signed-off-by: ノウラ | Flare <nouraellm@gmail.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>