Rebase shears/seen: 1 conflict(s) (0 skipped, 1 resolved) (#28989959866)#290
Open
gitforwindowshelper[bot] wants to merge 344 commits into
Open
Rebase shears/seen: 1 conflict(s) (0 skipped, 1 resolved) (#28989959866)#290gitforwindowshelper[bot] wants to merge 344 commits into
gitforwindowshelper[bot] wants to merge 344 commits into
Conversation
headless-git is a git executable without opening a console window. It is useful when other GUI executables want to call git. We should install it together with git on Windows. Signed-off-by: Yuyi Wang <Strawberry_Str@hotmail.com>
winuser.h contains the definition of RT_MANIFEST that our LLVM based toolchain needs to understand that we want to embed compat/win32/git.manifest as an application manifest. It currently just embeds it as additional data that Windows doesn't understand. This also helps our GCC based toolchain understand that we only want one copy embedded. It currently embeds one working assembly manifest and one nearly identical, but useless copy as additional data. This also teaches our Visual Studio based buildsystems to pick up the manifest file from git.rc. This means we don't have to explicitly specify it in contrib/buildsystems/Generators/Vcxproj.pm anymore. Slightly counter-intuitively this also means we have to explicitly tell Cmake not to embed a default manifest. This fixes git-for-windows#4707 Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
This will help with Git for Windows' maintenance going forward: It allows Git for Windows to switch its primary libcurl to a variant without the OpenSSL backend, while still loading an alternate when setting `http.sslBackend = openssl`. This is necessary to avoid maintenance headaches with upgrading OpenSSL: its major version name is encoded in the shared library's file name and hence major version updates (temporarily) break libraries that are linked against the OpenSSL library. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In Git for Windows v2.39.0, we fixed a regression where `git.exe` would no longer work in Windows Nano Server (frequently used in Docker containers). This GitHub workflow can be used to verify manually that the Git/Scalar executables work in Nano Server. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When running Git for Windows on a remote APFS filesystem, it would appear that the `mingw_open_append()`/`write()` combination would fail almost exactly like on some CIFS-mounted shares as had been reported in git-for-windows#2753, albeit with a different `errno` value. Let's handle that `errno` value just the same, by suggesting to set `windows.appendAtomically=false`. Signed-off-by: David Lomas <dl3@pale-eds.co.uk> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Windows 10 version 1511 (also known as Anniversary Update), according to https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences introduced native support for ANSI sequence processing. This allows using colors from the entire 24-bit color range. All we need to do is test whether the console's "virtual processing support" can be enabled. If it can, we do not even need to start the `console_thread` to handle ANSI sequences. Or, almost all we need to do: When `console_thread()` does its work, it uses the Unicode-aware `write_console()` function to write to the Win32 Console, which supports Git for Windows' implicit convention that all text that is written is encoded in UTF-8. The same is not necessarily true if native ANSI sequence processing is used, as the output is then subject to the current code page. Let's ensure that the code page is set to `CP_UTF8` as long as Git writes to it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
By default, the buffer type of Windows' `stdout` is unbuffered (_IONBF), and there is no need to manually fflush `stdout`. But some programs, such as the Windows Filtering Platform driver provided by the security software, may change the buffer type of `stdout` to full buffering. This nees `fflush(stdout)` to be called manually, otherwise there will be no output to `stdout`. Signed-off-by: MinarKotonoha <chengzhuo5@qq.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A long time ago, we decided to run tests in Git for Windows' SDK with the default `winsymlinks` mode: copying instead of linking. This is still the default mode of MSYS2 to this day. However, this is not how most users run Git for Windows: As the majority of Git for Windows' users seem to be on Windows 10 and newer, likely having enabled Developer Mode (which allows creating symbolic links without administrator privileges), they will run with symlink support enabled. This is the reason why it is crucial to get the fixes for CVE-2024-? to the users, and also why it is crucial to ensure that the test suite exercises the related test cases. This commit ensures the latter. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In order to be a better Windows citizenship, Git should save its configuration files on AppData folder. This can enables git configuration files be replicated between machines using the same Microsoft account logon which would reduce the friction of setting up Git on new systems. Therefore, if %APPDATA%\Git\config exists, we use it; otherwise $HOME/.config/git/config is used. Signed-off-by: Ariel Lourenco <ariellourenco@users.noreply.github.com>
Git LFS is now built with Go 1.21 which no longer supports Windows 7. However, Git for Windows still wants to support Windows 7. Ideally, Git LFS would re-introduce Windows 7 support until Git for Windows drops support for Windows 7, but that's not going to happen: git-for-windows#4996 (comment) The next best thing we can do is to let the users know what is happening, and how to get out of their fix, at least. This is not quite as easy as it would first seem because programs compiled with Go 1.21 or newer will simply throw an exception and fail with an Access Violation on Windows 7. The only way I found to address this is to replicate the logic from Go's very own `version` command (which can determine the Go version with which a given executable was built) to detect the situation, and in that case offer a helpful error message. This addresses git-for-windows#4996. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The sparse tree walk algorithm was created in d5d2e93 (revision: implement sparse algorithm, 2019-01-16) and involves using the mark_trees_uninteresting_sparse() method. This method takes a repository and an oidset of tree IDs, some of which have the UNINTERESTING flag and some of which do not. Create a method that has an equivalent set of preconditions but uses a "dense" walk (recursively visits all reachable trees, as long as they have not previously been marked UNINTERESTING). This is an important difference from mark_tree_uninteresting(), which short-circuits if the given tree has the UNINTERESTING flag. A use of this method will be added in a later change, with a condition set whether the sparse or dense approach should be used. Signed-off-by: Derrick Stolee <stolee@gmail.com>
While this command is definitely something we _want_, chances are that upstreaming this will require substantial changes. We still want to be able to experiment with this before that, to focus on what we need out of this command: To assist with diagnosing issues with large repositories, as well as to help monitoring the growth and the associated painpoints of such repositories. To that end, we are about to integrate this command into `microsoft/git`, to get the tool into the hands of users who need it most, with the idea to iterate in close collaboration between these users and the developers familar with Git's internals. However, we will definitely want to avoid letting anybody have the impression that this command, its exact inner workings, as well as its output format, are anywhere close to stable. To make that fact utterly clear (and thereby protect the freedom to iterate and innovate freely before upstreaming the command), let's mark its output as experimental in all-caps, as the first thing we do. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 245670c (credential-cache: check for windows specific errors, 2021-09-14) we concluded that on Windows we would always encounter ENETDOWN where we would expect ECONNREFUSED on POSIX systems, when connecting to unix sockets. As reported in [1], we do encounter ECONNREFUSED on Windows if the socket file doesn't exist, but the containing directory does and ENETDOWN if neither exists. We should handle this case like we do on non-windows systems. [1] git-for-windows#4762 (comment) This fixes git-for-windows#5314 Helped-by: M Hickford <mirth.hickford@gmail.com> Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The reftable library goes out of its way to use its own set of allocator functions that can be configured using `reftable_set_alloc()`. However, Git does not configure this. That is not typically a problem, except when Git uses a custom allocator via some definitions in `git-compat-util.h`, as is the case in Git for Windows (which switched away from the long-unmaintained nedmalloc to mimalloc). Then, it is quite possible that Git assigns a `strbuf` (allocated via the custom allocator) to, say, the `refname` field of a `reftable_log_record` in `write_transaction_table()`, and later on asks the reftable library function `reftable_log_record_release()` to release it, but that function was compiled without using `git-compat-util.h` and hence calls regular `free()` (i.e. _not_ the custom allocator's own function). This has been a problem for a long time and it was a matter of some sort of "luck" that 1) reftables are not commonly used on Windows, and 2) mimalloc can often ignore gracefully when it is asked to release memory that it has not allocated. However, a recent update to `seen` brought this problem to the forefront, letting t1460 fail in Git for Windows, with symptoms much in the same way as the problem I had to address in d02c37c (t-reftable-basics: allow for `malloc` to be `#define`d, 2025-01-08) where exit code 127 was also produced in lieu of `STATUS_HEAP_CORRUPTION` (C0000374) because exit codes are only 7 bits wide. It was not possible to figure out what change in particular caused these new failures within a reasonable time frame, as there are too many changes in `seen` that conflict with Git for Windows' patches, I had to stop the investigation after spending four hours on it fruitlessly. To verify that this patch fixes the issue, I avoided using mimalloc and temporarily patched in a "custom allocator" that would more reliably point out problems, like this: diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c index 68f3829..9421d630b9f5 100644 --- a/refs/reftable-backend.c +++ b/refs/reftable-backend.c @@ -353,6 +353,69 @@ static int reftable_be_fsync(int fd) return fsync_component(FSYNC_COMPONENT_REFERENCE, fd); } +#define DEBUG_REFTABLE_ALLOC +#ifdef DEBUG_REFTABLE_ALLOC +#include "khash.h" + +static inline khint_t __ac_X31_hash_ptr(void *ptr) +{ + union { + void *ptr; + char s[sizeof(void *)]; + } u; + size_t i; + khint_t h; + + u.ptr = ptr; + h = (khint_t)*u.s; + for (i = 0; i < sizeof(void *); i++) + h = (h << 5) - h + (khint_t)u.s[i]; + return h; +} + +#define kh_ptr_hash_func(key) __ac_X31_hash_ptr(key) +#define kh_ptr_hash_equal(a, b) ((a) == (b)) + +KHASH_INIT(ptr, void *, int, 0, kh_ptr_hash_func, kh_ptr_hash_equal) + +static kh_ptr_t *my_malloced; + +static void *my_malloc(size_t sz) +{ + int dummy; + void *ptr = malloc(sz); + if (ptr) + kh_put_ptr(my_malloced, ptr, &dummy); + return ptr; +} + +static void *my_realloc(void *ptr, size_t sz) +{ + int dummy; + if (ptr) { + khiter_t pos = kh_get_ptr(my_malloced, ptr); + if (pos >= kh_end(my_malloced)) + die("Was not my_malloc()ed: %p", ptr); + kh_del_ptr(my_malloced, pos); + } + ptr = realloc(ptr, sz); + if (ptr) + kh_put_ptr(my_malloced, ptr, &dummy); + return ptr; +} + +static void my_free(void *ptr) +{ + if (ptr) { + khiter_t pos = kh_get_ptr(my_malloced, ptr); + if (pos >= kh_end(my_malloced)) + die("Was not my_malloc()ed: %p", ptr); + kh_del_ptr(my_malloced, pos); + } + free(ptr); +} +#endif + static struct ref_store *reftable_be_init(struct repository *repo, const char *gitdir, unsigned int store_flags) @@ -362,6 +425,11 @@ static struct ref_store *reftable_be_init(struct repository *repo, int is_worktree; mode_t mask; +#ifdef DEBUG_REFTABLE_ALLOC + my_malloced = kh_init_ptr(); + reftable_set_alloc(my_malloc, my_realloc, my_free); +#endif + mask = umask(0); umask(mask); I briefly considered contributing this "custom allocator" patch, too, but it is unwieldy (for example, it would not work at all when compiling with mimalloc support) and it would only waste space (or even time, if a compile flag was introduced and exercised as part of the CI builds). Given that it is highly unlikely that Git will lose the new `reftable_set_alloc()` call by mistake, I rejected that idea as simply too wasteful. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Every once in a while, whitespace errors are introduced in Git for Windows' rebases to newer Git versions, simply by virtue of integrating upstream commits that do not follow upstream Git's own whitespace rule. In Git v2.50.0-rc0, for example, 03f2915 (xdiff: disable cleanup_records heuristic with --minimal, 2025-04-29) introduced a trailing space. Arguably, non-actionable alerts are worse than no alerts at all, so let's suppress those alerts that we cannot do anything about, anyway. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The 2.53.0.rc0.windows release candidate had a regression where writing to stderr from a pre-push hook would error out. The regression was fixed in 2.53.0.rc1.windows and the test here ensures that this stays fixed. Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
Preparation for widening the delta-encoding API to size_t in subsequent commits, which is what lets pack-objects drop the cast_size_t_to_ulong() shims that 606c192 (odb, packfile: use size_t for streaming object sizes, 2026-05-08) had to leave behind in get_delta() and try_delta() because their downstream consumers were still narrow. The struct is private to diff-delta.c, so widening its fields in isolation is a no-op at runtime: the values stored continue to fit in 32 bits on Windows because the public API around it still truncates. Splitting it out keeps the API-change commit focused on caller updates. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The sole caller (try_delta() in builtin/pack-objects.c) passes an unsigned long, which promotes safely, so no caller fixups are needed. Splitting it out keeps the diff_delta() / create_delta() widening, which does ripple to several callers, in its own commit. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
These three are a single accounting tuple (the globals tracking cumulative cached-delta bytes, plus the helper that compares them against an incoming delta size) and are latently 32-bit on Windows where unsigned long != size_t: a pack with many large cached deltas could wrap silently. The widening is internally consistent on its own: the additions and subtractions against delta_cache_size already come from size_t sources (DELTA_SIZE() returns size_t), and delta_cacheable()'s sole caller in try_delta() still passes unsigned long, which promotes. Prerequisite for dropping try_delta()'s cast_size_t_to_ulong() shims, which becomes possible once create_delta() and diff_delta() are widened in a later commit. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
free_unpacked() sums two byte counts: sizeof_delta_index() and SIZE(n->entry). The latter has been size_t since the prior topic "More work supporting objects larger than 4GB on Windows" widened SIZE() / oe_size() to size_t, so accumulating it into an unsigned long return was a silent Windows-only truncation on a packing run with many large objects. The sole caller (find_deltas()) holds its own mem_usage in an unsigned long for now and subtracts the return into it, so the new narrowing happens at that subtraction. find_deltas() and the matching try_delta() out-parameter are widened next. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The pair must move together because find_deltas() passes &mem_usage to try_delta(): widening either alone breaks the type match. mem_usage accumulates per-object byte counts already computed in size_t (SIZE() and sizeof_delta_index() reach here through free_unpacked(), now size_t), and was the last 32-bit-on-Windows narrowing point in the delta-window memory accounting chain. With this commit, that chain is internally size_t end-to-end except for sizeof_delta_index()'s still-narrow return, whose value is bounded by create_delta_index()'s entries cap. window_memory_limit (config-driven via git_config_ulong()) stays unsigned long: it is only compared against mem_usage and promotes. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Last stop in the delta-encoding API widening for >4 GiB blobs on
Windows: with create_delta_index() done in the prior commit and
create_delta()/diff_delta() finished here, every byte count that
crosses delta.h is now size_t. The struct fields they store into
have been size_t since the diff-delta struct widening.
The API change must move with all callers in the same commit (the
build only passes when every &delta_size matches the new size_t*).
Caller updates are kept minimal:
* builtin/pack-objects.c get_delta() and try_delta(): widen only
the local delta_size variable; the surrounding unsigned-long
locals and their cast_size_t_to_ulong() shims are out of scope
here and will be cleaned up in their own commits.
* builtin/fast-import.c, diff.c, t/helper/test-pack-deltas.c:
keep the local unsigned-long delta size (each feeds a still-
unsigned-long downstream consumer: zlib's avail_in,
deflate_it(), the test helper's own do_compress()), and bridge
via a temporary size_t plus cast_size_t_to_ulong(). The new
casts are paid back in later topics that widen those consumers.
* t/helper/test-delta.c: widen the local outright (no downstream
consumer beyond the test's own out_size, which is already
size_t).
Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Continue the size_t evacuation around large object handling: with deflate_it() and the locals around it widened, the cast_size_t_to_ulong() shim the prior delta_delta() widening had to leave behind in emit_binary_diff_body() goes away. deflate_it() is file-static; the only callers are the two in emit_binary_diff_body() already touched here. emit_diff_symbol() formats the resulting sizes via uintmax_t / %"PRIuMAX", so the diff output is not affected; only the per-process upper bound on a binary patch chunk that this function can address grows beyond 4 GiB on Windows. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Bundling the two widenings: four call sites pass &stream.avail_in directly to use_pack(), and widening either type fencepost alone would force a bridge variable at each. Doing both together is the simpler end state and is the prerequisite for the do_compress() widening in the next commit, which is what lets write_no_reuse_object() lose its last cast_size_t_to_ulong() shim. The unsigned-long locals widened at the other use_pack() callers (avail / remaining / left) hold pack-window sizes bounded by core.packedGitWindowSize, so the change is type consistency rather than a new >4GB capability. git_zstream.avail_in / avail_out likewise reach zlib's uInt fields only after zlib_buf_cap()'s 1 GiB cap, so the wrapper already accepted size_t-shaped inputs in practice. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Prep for the upcoming read_blob_data_from_index() widening, whose callers in convert.c feed the size they receive straight into these two helpers. Both are file-static, so the change is contained. Also fixes a small pre-existing narrowing on the get_wt_convert_stats_ascii() path, where strbuf.len (size_t) was passed to a unsigned long parameter. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Prep for the upcoming git_deflate_bound() widening to size_t: the local that catches its return needs to be size_t too, otherwise the widening would introduce a silent Windows narrowing here. No semantic effect with the current unsigned-long-returning git_deflate_bound() (size_t == unsigned long on this caller's platforms today). Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Continue the size_t evacuation. read_blob_data_from_index() reads the blob through the size_t odb_read_object() API but writes the size back through an unsigned long out-parameter, silently truncating anything past 4 GiB on Windows. Widen the out-parameter, drop the cast_size_t_to_ulong() shim, and move the matching locals in the two convert.c callers and the one in attr.c. Their downstream consumers (gather_convert_stats() widened in the prior commit and read_attr_from_buf() already size_t) take the new type directly. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Fixes a pre-existing silent narrowing from git_deflate_bound()'s unsigned long return into an int local: anything past 2 GiB has always wrapped negative here and then been re-extended to size_t inside xmalloc(). Also prep for the upcoming git_deflate_bound() widening to size_t, which would extend the narrowing further if bound stayed int. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Prep for the widenings of its callers, where size-receiving locals will become size_t (combine-diff's result_size in the immediately following commit, struct diff_filespec.size in a later topic). Body caps the parameter at 8000 anyway, so the type change is mechanical. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This will come in handy in the next commit. Signed-off-by: JiSeop Moon <zcube@zcube.kr> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In this time and age, AI is everywhere. However, it's sometimes not very easy to use. For green-field projects it works quite a bit better than for existing legacy projects. And Git's source code is _quite_ as legacy code as they come... 😁 Now, the only way how AI can be used efficiently with legacy code is by providing enough information by way of prompt context for the AI to have a chance to make any sense of the code. The structure and the architecture is, after all, not designed for AI, but rather the opposite: By virtue of having grown organically over two decades, there is no design that AI coding models would readily grasp. So here is a document that describes all kinds of aspects about this project. The idea is to help AI by providing information that it does not have ingrained in its weights. The idea is to provide information that a human prompter might take for granted, but no coding model will have been trained on specifically. Assisted-by: Claude Opus 4.5 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Git project followed Git for Windows' lead and added their Code of Conduct, based on the Contributor Covenant v1.4, later updated to v2.0. We adapt it slightly to Git for Windows. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
These are Git for Windows' Git GUI and gitk patches. We will have to decide at some point what to do about them, but that's a little lower priority (as Git GUI seems to be unmaintained for the time being, and the gitk maintainer keeps a very low profile on the Git mailing list, too). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Getting started contributing to Git can be difficult on a Windows machine. CONTRIBUTING.md contains a guide to getting started, including detailed steps for setting up build tools, running tests, and submitting patches to upstream. [includes an example by Pratik Karki how to submit v2, v3, v4, etc.] Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes touch-ups by 마누엘, Philip Oakley and 孙卓识. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and Philip Oakley. Helped-by: Clive Chan <cc@clive.io> Helped-by: Adric Norris <landstander668@gmail.com> Helped-by: Ben Bodenmiller <bbodenmiller@hotmail.com> Helped-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Brendan Forster <brendan@github.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A fix for calling `vim` in Windows Terminal caused a regression and was reverted. We partially un-revert this, to get the fix again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Git for Windows accepts pull requests; Core Git does not. Therefore we need to adjust the template (because it only matches core Git's project management style, not ours). Also: direct Git for Windows enhancements to their contributions page, space out the text for easy reading, and clarify that the mailing list is plain text, not HTML. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Rather than using private IFTTT Applets that send mails to this maintainer whenever a new version of a Git for Windows component was released, let's use the power of GitHub workflows to make this process publicly visible. This workflow monitors the Atom/RSS feeds, and opens a ticket whenever a new version was released. Note: Bash sometimes releases multiple patched versions within a few minutes of each other (i.e. 5.1p1 through 5.1p4, 5.0p15 and 5.0p16). The MSYS2 runtime also has a similar system. We can address those patches as a group, so we shouldn't get multiple issues about them. Note further: We're not acting on newlib releases, OpenSSL alphas, Perl release candidates or non-stable Perl releases. There's no need to open issues about them. Co-authored-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reintroduce the 'core.useBuiltinFSMonitor' config setting (originally added in 0a756b2 (fsmonitor: config settings are repository-specific, 2021-03-05)) after its removal from the upstream version of FSMonitor. Upstream, the 'core.useBuiltinFSMonitor' setting was rendered obsolete by "overloading" the 'core.fsmonitor' setting to take a boolean value. However, several applications (e.g., 'scalar') utilize the original config setting, so it should be preserved for a deprecation period before complete removal: * if 'core.fsmonitor' is a boolean, the user is correctly using the new config syntax; do not use 'core.useBuiltinFSMonitor'. * if 'core.fsmonitor' is unspecified, use 'core.useBuiltinFSMonitor'. * if 'core.fsmonitor' is a path, override and use the builtin FSMonitor if 'core.useBuiltinFSMonitor' is 'true'; otherwise, use the FSMonitor hook indicated by the path. Additionally, for this deprecation period, advise users to switch to using 'core.fsmonitor' to specify their use of the builtin FSMonitor. Signed-off-by: Victoria Dye <vdye@github.com>
This topic branch re-adds the deprecated --stdin/-z options to `git reset`. Those patches were overridden by a different set of options in the upstream Git project before we could propose `--stdin`. We offered this in MinGit to applications that wanted a safer way to pass lots of pathspecs to Git, and these applications will need to be adjusted. Instead of `--stdin`, `--pathspec-from-file=-` should be used, and instead of `-z`, `--pathspec-file-nul`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is the recommended way on GitHub to describe policies revolving around security issues and about supported versions. Helped-by: Sven Strickroth <email@cs-ware.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions for details. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Originally introduced as `core.useBuiltinFSMonitor` in Git for Windows and developed, improved and stabilized there, the built-in FSMonitor only made it into upstream Git (after unnecessarily long hemming and hawing and throwing overly perfectionist style review sticks into the spokes) as `core.fsmonitor = true`. In Git for Windows, with this topic branch, we re-introduce the now-obsolete config setting, with warnings suggesting to existing users how to switch to the new config setting, with the intention to ultimately drop the patch at some stage. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Upstream Git does not test their tags with the expensive set of tests, so a couple of them seem quite broken for now, even so much as hanging indefinitely. It is outside of the responsibility of the Git for Windows project to fix upstream's own tests for platforms other than Windows, so let's not exercise them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…updates Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v5...v6) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/cache/releases">actions/cache's releases</a>.</em></p> <blockquote> <h2>v6.0.0</h2> <h2>What's Changed</h2> <ul> <li>Update packages, migrate to ESM by <a href="https://github.com/Samirat"><code>@Samirat</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1760">actions/cache#1760</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v5...v6.0.0">https://github.com/actions/cache/compare/v5...v6.0.0</a></p> <h2>v5.1.0</h2> <h2>What's Changed</h2> <ul> <li>Bump <code>@actions/cache</code> to v5.1.0 - handle read-only cache access by <a href="https://github.com/jasongin"><code>@jasongin</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1775">actions/cache#1775</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v5...v5.1.0">https://github.com/actions/cache/compare/v5...v5.1.0</a></p> <h2>v5.0.5</h2> <h2>What's Changed</h2> <ul> <li>Update ts-http-runtime dependency by <a href="https://github.com/yacaovsnc"><code>@yacaovsnc</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1747">actions/cache#1747</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v5...v5.0.5">https://github.com/actions/cache/compare/v5...v5.0.5</a></p> <h2>v5.0.4</h2> <h2>What's Changed</h2> <ul> <li>Add release instructions and update maintainer docs by <a href="https://github.com/Link"><code>@Link</code></a>- in <a href="https://redirect.github.com/actions/cache/pull/1696">actions/cache#1696</a></li> <li>Potential fix for code scanning alert no. 52: Workflow does not contain permissions by <a href="https://github.com/Link"><code>@Link</code></a>- in <a href="https://redirect.github.com/actions/cache/pull/1697">actions/cache#1697</a></li> <li>Fix workflow permissions and cleanup workflow names / formatting by <a href="https://github.com/Link"><code>@Link</code></a>- in <a href="https://redirect.github.com/actions/cache/pull/1699">actions/cache#1699</a></li> <li>docs: Update examples to use the latest version by <a href="https://github.com/XZTDean"><code>@XZTDean</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1690">actions/cache#1690</a></li> <li>Fix proxy integration tests by <a href="https://github.com/Link"><code>@Link</code></a>- in <a href="https://redirect.github.com/actions/cache/pull/1701">actions/cache#1701</a></li> <li>Fix cache key in examples.md for bun.lock by <a href="https://github.com/RyPeck"><code>@RyPeck</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1722">actions/cache#1722</a></li> <li>Update dependencies & patch security vulnerabilities by <a href="https://github.com/Link"><code>@Link</code></a>- in <a href="https://redirect.github.com/actions/cache/pull/1738">actions/cache#1738</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/XZTDean"><code>@XZTDean</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1690">actions/cache#1690</a></li> <li><a href="https://github.com/RyPeck"><code>@RyPeck</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1722">actions/cache#1722</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v5...v5.0.4">https://github.com/actions/cache/compare/v5...v5.0.4</a></p> <h2>v5.0.3</h2> <h2>What's Changed</h2> <ul> <li>Bump <code>@actions/cache</code> to v5.0.5 (Resolves: <a href="https://github.com/actions/cache/security/dependabot/33">https://github.com/actions/cache/security/dependabot/33</a>)</li> <li>Bump <code>@actions/core</code> to v2.0.3</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v5...v5.0.3">https://github.com/actions/cache/compare/v5...v5.0.3</a></p> <h2>v.5.0.2</h2> <h1>v5.0.2</h1> <h2>What's Changed</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's changelog</a>.</em></p> <blockquote> <h1>Releases</h1> <h2>How to prepare a release</h2> <blockquote> <p>[!NOTE] Relevant for maintainers with write access only.</p> </blockquote> <ol> <li>Switch to a new branch from <code>main</code>.</li> <li>Run <code>npm test</code> to ensure all tests are passing.</li> <li>Update the version in <a href="https://github.com/actions/cache/blob/main/package.json"><code>https://github.com/actions/cache/blob/main/package.json</code></a>.</li> <li>Run <code>npm run build</code> to update the compiled files.</li> <li>Update this <a href="https://github.com/actions/cache/blob/main/RELEASES.md"><code>https://github.com/actions/cache/blob/main/RELEASES.md</code></a> with the new version and changes in the <code>## Changelog</code> section.</li> <li>Run <code>licensed cache</code> to update the license report.</li> <li>Run <code>licensed status</code> and resolve any warnings by updating the <a href="https://github.com/actions/cache/blob/main/.licensed.yml"><code>https://github.com/actions/cache/blob/main/.licensed.yml</code></a> file with the exceptions.</li> <li>Commit your changes and push your branch upstream.</li> <li>Open a pull request against <code>main</code> and get it reviewed and merged.</li> <li>Draft a new release <a href="https://github.com/actions/cache/releases">https://github.com/actions/cache/releases</a> use the same version number used in <code>package.json</code> <ol> <li>Create a new tag with the version number.</li> <li>Auto generate release notes and update them to match the changes you made in <code>RELEASES.md</code>.</li> <li>Toggle the set as the latest release option.</li> <li>Publish the release.</li> </ol> </li> <li>Navigate to <a href="https://github.com/actions/cache/actions/workflows/release-new-action-version.yml">https://github.com/actions/cache/actions/workflows/release-new-action-version.yml</a> <ol> <li>There should be a workflow run queued with the same version number.</li> <li>Approve the run to publish the new version and update the major tags for this action.</li> </ol> </li> </ol> <h2>Changelog</h2> <h3>6.1.0</h3> <ul> <li>Bump <code>@actions/cache</code> to v6.1.0 to pick up <a href="https://redirect.github.com/actions/toolkit/pull/2435">actions/toolkit#2435 Handle cache write error due to read-only token</a></li> <li>Switch redundant "Cache save failed" warning to debug log in save-only</li> </ul> <h3>6.0.0</h3> <ul> <li>Updated <code>@actions/cache</code> to ^6.0.1, <code>@actions/core</code> to ^3.0.1, <code>@actions/exec</code> to ^3.0.0, <code>@actions/io</code> to ^3.0.2</li> <li>Migrated to ESM module system</li> <li>Upgraded Jest to v30 and test infrastructure to be ESM compatible</li> </ul> <h3>5.0.4</h3> <ul> <li>Bump <code>minimatch</code> to v3.1.5 (fixes ReDoS via globstar patterns)</li> <li>Bump <code>undici</code> to v6.24.1 (WebSocket decompression bomb protection, header validation fixes)</li> <li>Bump <code>fast-xml-parser</code> to v5.5.6</li> </ul> <h3>5.0.3</h3> <ul> <li>Bump <code>@actions/cache</code> to v5.0.5 (Resolves: <a href="https://github.com/actions/cache/security/dependabot/33">https://github.com/actions/cache/security/dependabot/33</a>)</li> <li>Bump <code>@actions/core</code> to v2.0.3</li> </ul> <h3>5.0.2</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/cache/commit/55cc8345863c7cc4c66a329aec7e433d2d1c52a9"><code>55cc834</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1768">#1768</a> from jasongin/readonly-cache</li> <li><a href="https://github.com/actions/cache/commit/d8cd72f230726cdf4457ebb61ec1b593a8d12337"><code>d8cd72f</code></a> Bump <code>@actions/cache</code> to v6.1.0 - handle cache write error due to RO token</li> <li><a href="https://github.com/actions/cache/commit/2c8a9bd7457de244a408f35966fab2fb45fda9c8"><code>2c8a9bd</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1760">#1760</a> from actions/samirat/esm_migration_and_package_update</li> <li><a href="https://github.com/actions/cache/commit/e9b91fdc3fea7d79165fceb79042ef45c2d51023"><code>e9b91fd</code></a> Prettier fixes</li> <li><a href="https://github.com/actions/cache/commit/e4884b8ff7f92ef6b52c79eda480bbc86e685adb"><code>e4884b8</code></a> Rebuild dist</li> <li><a href="https://github.com/actions/cache/commit/10baf0191a3c426ea0fa4a3253a5c04233b6e18f"><code>10baf01</code></a> Fixed licenses</li> <li><a href="https://github.com/actions/cache/commit/e39b386c9004d72a15d864ade8c0b3a702d47a37"><code>e39b386</code></a> Fix test mock return order</li> <li><a href="https://github.com/actions/cache/commit/b6928203372a8571ff984c0c883ef3a1adfb0c06"><code>b692820</code></a> PR feedback</li> <li><a href="https://github.com/actions/cache/commit/60749128a44d25d3c520a489e576380cf00ff3f1"><code>6074912</code></a> Rebuild dist bundles as ESM to match type:module</li> <li><a href="https://github.com/actions/cache/commit/5a912e8b4af820fa082a0e75cfd2c782f8fbfe0e"><code>5a912e8</code></a> Fix lint and jest issues</li> <li>Additional commits viewable in <a href="https://github.com/actions/cache/compare/v5...v6">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
) While upstreaming those patches, I've been asked to adjust them. This backports those fixes. Of course, the _real_ reason to do this _now_ is that I need _some_ PR to make a new Git for Windows release (to address [the NTLM](git-for-windows#6308) issue).
Mirror what git survey already reports: lightweight tags (pointing straight at a commit/tree/blob) and annotated tags (pointing at an OBJ_TAG that is itself stored as a separate object) are different things in many monorepo contexts, and one of the differences git survey users routinely care about. Add an annotated_tags counter to struct ref_stats, populate it in count_references() by peeking at the ref OID's object type, and expose it as a sub-row under Tags in the table output and as references.tags.annotated.count in the machine-readable formats. Step toward pivoting the standalone git survey command onto git repo structure; this fills the first of the four feature gaps documented in the assessment. Tests in t1901 widened to assert the new row and key. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
`git repo structure` walks every reference enumerated by `refs_for_each_ref()` and feeds each reference's tip into the path walk that produces the object counts. There is no way to scope the inquiry to a subset of refs, even though that is the most common need when an operator is investigating what part of the history is driving cost: only branches, only release tags, only one remote's view, etc. Add a single `--ref-filter=<pattern>` option that, when given, restricts both the reference count and the object walk to refs whose full name matches one of the patterns. The option is repeatable; multiple patterns form a union, so `--ref-filter='refs/heads/*' --ref-filter='refs/tags/v*'` includes local branches and tags whose short name starts with `v`. Patterns use `wildmatch()` with `WM_PATHNAME` semantics so a `*` does not cross `/`, matching the convention used by `git for-each-ref` positional arguments. Choosing a single flexible filter, rather than a proliferation of per-kind flags like `--branches`, `--tags`, `--remotes`, keeps the option surface small and lets the same mechanism express narrow selections the per-kind flags could not, such as "only release tags" (`'refs/tags/v*'`) or "only one remote's branches" (`'refs/remotes/origin/*'`). Without `--ref-filter`, behaviour is unchanged: every ref `refs_for_each_ref()` enumerates contributes. Both the reference counter and the path-walk seeding (via `add_pending_oid()`) sit on the same callback, so an early return when no pattern matches naturally excludes a ref from both. No separate object-walk machinery is needed. Cover the two interesting code paths with tests in t1901: a single filter narrowing to branches, and two filters unioning to include both branches and tags. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
`git survey` distinguishes itself from `git repo structure` largely by its path-level reporting: in addition to whole-repo totals it lists the paths whose object histories dominate the repository, ranked by raw count, on-disk size, and inflated size, separately for trees and blobs. That is often the most actionable output from `git survey`, since it points an operator at the directories and files that should be reviewed for cleanup, sparse-checkout exclusion, or rewriting. `git repo structure` already drives the same path-walk traversal that `git survey` uses to gather its per-path numbers; the callback simply discards the path. Aggregate per-(path, type) summaries inside that existing callback and add a bounded, descending-sorted "top-N" table keyed by each of the three axes. Gate the feature behind a new `--top=<n>` option, defaulting to 0, so unadorned invocations are unaffected and pay no extra work for the top-N tracking. Mirror the sort and eviction strategy from `builtin/survey.c`: keep an array of at most N entries sorted from largest to smallest, walk it from the bottom on each candidate, and shift entries down when a new one belongs. Compared to `builtin/survey.c`, drop the void-pointer indirection in the table data, type the comparator's arguments, and fold the trivial comparators into the `(a > b) - (a < b)` idiom. For the human-readable `table` output, extend the existing nested bullet layout with two new top-level sections, `* Top trees` and `* Top blobs`, each containing three sub-tables (`Top by count`, `Top by disk size`, `Top by inflated size`). The path becomes the row name and the relevant scalar becomes the value, reusing `stats_table_count_addf` and `stats_table_size_addf` so units and column alignment match the rest of the table. For the `lines`/`nul` key-value formats, emit one `objects.<type>.top.by_<axis>.<rank>.path=<path>` entry alongside an `objects.<type>.top.by_<axis>.<rank>.<axis>=<value>` entry per ranked path, so consumers can dispatch by axis without parsing the schema. The root tree's path is the empty string as produced by the path-walk machinery; preserve that as-is to stay faithful to the upstream representation rather than fabricating a placeholder. This is the first piece of folding `git survey`'s functionality into `git repo structure`. Subsequent commits will add the corresponding configuration knob and, eventually, turn `git survey` into a thin deprecated shim over `git repo structure`. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The preceding commit added `--top=<n>` to `git repo structure`,
reporting the top-N paths per type ranked by count, on-disk size, and
inflated size. Cover the three behaviors that matter for that option:
* Without `--top`, the key-value output emits no `top.*` keys, so
existing parsers stay unaffected.
* `--top=N` produces exactly N ranked entries on each of the six
`objects.<type>.top.by_<axis>` axes (count/disk_size/inflated_size
crossed with trees/blobs), and a constructed input where one blob
is several orders of magnitude bigger than the other lets us
assert the ordering on the disk-size and inflated-size axes.
* A negative `--top` is rejected with a non-zero exit and a message
naming the constraint, so a typo cannot silently degrade into the
default zero.
Avoid grep patterns starting with `--`; grep would parse the leading
double dash as an option terminator.
Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
`git survey` exposes its `--top` default via `survey.top` so that a site or per-repository operator can switch the detail tables on once and have every subsequent invocation include them. Mirror that ergonomics for `git repo structure` so that, as `git survey`'s functionality is folded into `git repo structure`, the configuration side of the migration story stays equivalent. Add a small `git_config_int` callback bound to `repo.structure.top` and invoke it before `parse_options()`, so a `--top=<N>` on the command line cleanly overrides the configured default (including `--top=0` to opt out of the detail tables when configuration enables them). Reject negative configured values with the same wording as the command-line guard, since `git_config_int()` happily returns negative integers. Document the new variable in a fresh `Documentation/config/repo.adoc` and wire it into the alphabetical includes in `Documentation/config.adoc` between `repack.adoc` and `rerere.adoc`. Cover the precedence behaviour with a t1901 test: a configured value enables the tables by default, and a command-line `--top=0` suppresses them again. Note that the reported paths respect the `core.quotePath` setting. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
`git survey` started life as an experimental scale-measurement tool; the preceding commits give `git repo structure` the path-level detail tables and ref-scoping mechanism that were `git survey`'s main draw, so the two now overlap substantially. Plan the migration explicitly: add a short notice at the top of the description making clear which of `git survey`'s knobs map to which `git repo structure` option, and state that a future release will turn `git survey` into a thin shim over `git repo structure`. Putting the notice in the description (rather than only the synopsis) ensures it shows up in `git help survey` rendering before the reader sees any option specifics, so an operator skimming the page learns about the replacement before adopting any survey-specific flags. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
`git survey` was an experimental scale-measurement tool whose
distinctive features (ref-kind filters, top-N path tables) are now
all available in `git repo structure`. With the path-level reporting
in place (commits "repo: filter the structure scope via
--ref-filter=<pattern>" and "repo: report top-N paths by count, disk,
and inflated size in structure"), there is no functionality `git
survey` provides that `git repo structure` cannot.
Replace the 764-line `git survey` implementation with a roughly
hundred-line shim that:
* Accepts the existing `git survey` command line so callers in
scripts continue to parse without changes.
* Emits a deprecation warning naming the replacement command, so
interactive users learn about the migration target.
* Translates the survey-specific knobs into the equivalent
`git repo structure` invocation and re-execs the canonical
command via `execv_git_cmd()`. Per-kind ref selectors fan out
into the corresponding `refs/heads/*`, `refs/tags/*`, etc.
`--ref-filter` patterns; `--top=<N>` is forwarded directly;
`--all-refs` becomes the absence of any `--ref-filter`.
Two survey options have no `git repo structure` counterpart:
`--verbose` controlled per-step trace output the new command does
not emit, and `--detached` selected the detached HEAD which
`git repo structure` does not enumerate separately. Both are
silently accepted and produce a single warning each, so old
invocations keep working while the absence of these knobs in `git
repo structure` is made visible.
Rewrite t8100 to assert the shim's contract: the deprecation
warning is printed, the output is byte-identical to a corresponding
`git repo structure` invocation, and the per-kind selector
translation produces the right `--ref-filter` pattern. The
preceding survey-specific output assertions (the multi-column
plaintext tables) no longer apply, since `git repo structure`'s
output format is now the canonical one and is covered by t1901.
The `survey.*` configuration keys (`survey.top`, `survey.progress`,
`survey.verbose`) are no longer honored by the shim. They were
mirrored by the preceding `repo.structure.top` work for the most
useful knob; users with `survey.top` set in config should migrate
to `repo.structure.top`. This is a backward-incompatible removal
documented by the deprecation notice in `git-survey.adoc`.
Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…it-for-windows#6268) `git survey` was always experimental, and I never got around to upstreaming it to make it non-experimental. In the meantime, the `git repo structure` command was upstreamed upstream, which covers most of the same ground with a cleaner option surface and a stable output contract. This PR closes the remaining gap (annotated-tag breakdown, ref scoping, top-N paths by count/disk/inflated, and the corresponding configuration knob) and then turns `git survey` into a thin shim that warns about deprecation, translates its old command line into the equivalent `git repo structure` invocation, and re-execs the canonical command. Net result: one user-facing tool to maintain and to teach instead of two. The intent is that scripts pinned to `git survey` keep working (a warning aside), and that operators have a single answer when they ask "how do I see what's making my repository large?". The `survey.*` configuration keys are intentionally dropped; the only one that mattered, `survey.top`, has a direct replacement in `repo.structure.top`.
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.
Workflow run
Rebase Summary: seen
From: 5e2a260418 (Turn
git surveyinto a deprecated shim overgit repo structure(git-for-windows#6268), 2026-07-08) (b4c1920d7c..5e2a260418)Resolved: fb0aa96 (Some amendments for the
hashliteral_tsize fixes (git-for-windows#6311), 2026-07-03)resolved all conflicts by taking HEAD for files unchanged by the merge, removed files not in merge result, and applied the merge's semantic change (removing !LONG_IS_64BIT prerequisite in t1007)
Range-diff
1: fb0aa96 ! 1: 0f92651 Some amendments for the
hashliteral_tsize fixes (Some amendments for thehashliteral_tsize fixes git#6311)@@ Commit message to make a new Git for Windows release (to address [the NTLM](https://github.com/git-for-windows/git/issues/6308) issue). - ## lib/refs/reftable-backend.c ## -@@ lib/refs/reftable-backend.c: static struct ref_store *reftable_be_init(struct repository *repo, + ## .github/workflows/main.yml ## + remerge CONFLICT (content): Merge conflict in .github/workflows/main.yml + index 3219b1dc6e..57ad4ba64f 100644 + --- .github/workflows/main.yml + +++ .github/workflows/main.yml +@@ .github/workflows/main.yml: jobs: + uses: microsoft/setup-msbuild@v3 + - name: copy dlls to root + shell: cmd +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + run: lib\compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows + - name: generate Visual Studio solution + shell: bash + run: | + cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/lib/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \ +-======= +- run: compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows +- - name: generate Visual Studio solution +- shell: bash +- run: | +- cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \ +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows -DHOST_CPU=${{ matrix.arch }} + - name: MSBuild + run: | + + ## Makefile ## + remerge CONFLICT (content): Merge conflict in Makefile + index c35865b869..01438d3f3d 100644 + --- Makefile + +++ Makefile +@@ Makefile: else + endif + + ifdef LAZYLOAD_LIBCURL +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + LAZYLOAD_LIBCURL_OBJ = lib/compat/lazyload-curl.o +-======= +- LAZYLOAD_LIBCURL_OBJ = compat/lazyload-curl.o +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + OBJECTS += $(LAZYLOAD_LIBCURL_OBJ) + # The `CURL_STATICLIB` constant must be defined to avoid seeing the functions + # declared as DLL imports +@@ Makefile: endif + endif + ifdef USE_CURL_FOR_IMAP_SEND + BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + IMAP_SEND_BUILDDEPS = lib/http.o $(LAZYLOAD_LIBCURL_OBJ) +-======= +- IMAP_SEND_BUILDDEPS = http.o $(LAZYLOAD_LIBCURL_OBJ) +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + IMAP_SEND_LDFLAGS += $(CURL_LIBCURL) + endif + ifndef NO_EXPAT +@@ Makefile: git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(IMAP_SEND_LDFLAGS) $(LIBS) + +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + git-http-fetch$X: lib/http.o lib/http-walker.o http-fetch.o $(LAZYLOAD_LIBCURL_OBJ) GIT-LDFLAGS $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(CURL_LIBCURL) $(LIBS) + git-http-push$X: lib/http.o http-push.o $(LAZYLOAD_LIBCURL_OBJ) GIT-LDFLAGS $(GITLIBS) +-======= +-git-http-fetch$X: http.o http-walker.o http-fetch.o $(LAZYLOAD_LIBCURL_OBJ) GIT-LDFLAGS $(GITLIBS) +- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ +- $(CURL_LIBCURL) $(LIBS) +-git-http-push$X: http.o http-push.o $(LAZYLOAD_LIBCURL_OBJ) GIT-LDFLAGS $(GITLIBS) +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS) + +@@ Makefile: $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY) + ln -s $< $@ 2>/dev/null || \ + cp $< $@ + +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + $(REMOTE_CURL_PRIMARY): remote-curl.o lib/http.o lib/http-walker.o $(LAZYLOAD_LIBCURL_OBJ) GIT-LDFLAGS $(GITLIBS) +-======= +-$(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(LAZYLOAD_LIBCURL_OBJ) GIT-LDFLAGS $(GITLIBS) +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS) + + + ## ci/lib.sh ## + remerge CONFLICT (content): Merge conflict in ci/lib.sh + index f8c8f1a6b8..f31a36ceeb 100755 + --- ci/lib.sh + +++ ci/lib.sh +@@ ci/lib.sh: export SKIP_DASHED_BUILT_INS=YesPlease + # In order to catch bugs introduced at integration time by mismerges, + # enable the long tests for pushes to the integration branches as well. + test -z "$MSYSTEM" || +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + case "$CI_EVENT,$CI_BRANCH" in +-======= +-case "$GITHUB_EVENT_NAME,$CI_BRANCH" in +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*) + export GIT_TEST_LONG=${GIT_TEST_LONG:-true} + ;; + + ## compat/win32/dirent.h (deleted) ## + remerge CONFLICT (modify/delete): compat/win32/dirent.h deleted in da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) and modified in c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input). Version c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) of compat/win32/dirent.h left in tree. + index a58a8075fd..0000000000 + --- compat/win32/dirent.h + +++ /dev/null +@@ +-#ifndef DIRENT_H +-#define DIRENT_H +- +-#define DT_UNKNOWN 0 +-#define DT_DIR 1 +-#define DT_REG 2 +-#define DT_LNK 3 +- +-struct dirent { +- unsigned char d_type; /* file type to prevent lstat after readdir */ +- char d_name[/* FLEX_ARRAY */]; /* file name */ +-}; +- +-/* +- * Base DIR structure, contains pointers to readdir/closedir implementations so +- * that opendir may choose a concrete implementation on a call-by-call basis. +- */ +-typedef struct DIR { +- struct dirent *(*preaddir)(struct DIR *dir); +- int (*pclosedir)(struct DIR *dir); +-} DIR; +- +-/* default dirent implementation */ +-extern DIR *dirent_opendir(const char *dirname); +- +-#define opendir git_opendir +- +-/* current dirent implementation */ +-extern DIR *(*opendir)(const char *dirname); +- +-#define readdir(dir) (dir->preaddir(dir)) +-#define closedir(dir) (dir->pclosedir(dir)) +- +-#endif /* DIRENT_H */ + + ## compat/win32/path-utils.c (deleted) ## + remerge CONFLICT (modify/delete): compat/win32/path-utils.c deleted in da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) and modified in c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input). Version c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) of compat/win32/path-utils.c left in tree. + index c4fea0301b..0000000000 + --- compat/win32/path-utils.c + +++ /dev/null +@@ +-#define USE_THE_REPOSITORY_VARIABLE +- +-#include "../../git-compat-util.h" +-#include "../../environment.h" +-#include "../../wrapper.h" +-#include "../../strbuf.h" +-#include "../../versioncmp.h" +- +-int win32_has_dos_drive_prefix(const char *path) +-{ +- int i; +- +- /* +- * Does it start with an ASCII letter (i.e. highest bit not set), +- * followed by a colon? +- */ +- if (!(0x80 & (unsigned char)*path)) +- return *path && path[1] == ':' ? 2 : 0; +- +- /* +- * While drive letters must be letters of the English alphabet, it is +- * possible to assign virtually _any_ Unicode character via `subst` as +- * a drive letter to "virtual drives". Even `1`, or `ä`. Or fun stuff +- * like this: +- * +- * subst ֍: %USERPROFILE%\Desktop +- */ +- for (i = 1; i < 4 && (0x80 & (unsigned char)path[i]); i++) +- ; /* skip first UTF-8 character */ +- return path[i] == ':' ? i + 1 : 0; +-} +- +-int win32_skip_dos_drive_prefix(char **path) +-{ +- int ret = has_dos_drive_prefix(*path); +- *path += ret; +- return ret; +-} +- +-int win32_offset_1st_component(const char *path) +-{ +- char *pos = (char *)path; +- +- /* unc paths */ +- if (!skip_dos_drive_prefix(&pos) && +- is_dir_sep(pos[0]) && is_dir_sep(pos[1])) { +- /* skip server name */ +- pos = strpbrk(pos + 2, "\\/"); +- if (!pos) +- return 0; /* Error: malformed unc path */ +- +- do { +- pos++; +- } while (*pos && !is_dir_sep(*pos)); +- } +- +- return pos + is_dir_sep(*pos) - path; +-} +- +-int win32_fspathncmp(const char *a, const char *b, size_t count) +-{ +- int diff; +- +- for (;;) { +- if (!count--) +- return 0; +- if (!*a) +- return *b ? -1 : 0; +- if (!*b) +- return +1; +- +- if (is_dir_sep(*a)) { +- if (!is_dir_sep(*b)) +- return -1; +- a++; +- b++; +- continue; +- } else if (is_dir_sep(*b)) +- return +1; +- +- diff = ignore_case ? +- (unsigned char)tolower(*a) - (int)(unsigned char)tolower(*b) : +- (unsigned char)*a - (int)(unsigned char)*b; +- if (diff) +- return diff; +- a++; +- b++; +- } +-} +- +-int win32_fspathcmp(const char *a, const char *b) +-{ +- return win32_fspathncmp(a, b, (size_t)-1); +-} +- +-static int read_at(int fd, char *buffer, size_t offset, size_t size) +-{ +- if (lseek(fd, offset, SEEK_SET) < 0) { +- fprintf(stderr, "could not seek to 0x%x\n", (unsigned int)offset); +- return -1; +- } +- +- return read_in_full(fd, buffer, size); +-} +- +-static size_t le16(const char *buffer) +-{ +- unsigned char *u = (unsigned char *)buffer; +- return u[0] | (u[1] << 8); +-} +- +-static size_t le32(const char *buffer) +-{ +- return le16(buffer) | (le16(buffer + 2) << 16); +-} +- +-/* +- * Determine the Go version of a given executable, if it was built with Go. +- * +- * This recapitulates the logic from +- * https://github.com/golang/go/blob/master/src/cmd/go/internal/version/version.go +- * (without requiring the user to install `go.exe` to find out). +- */ +-static ssize_t get_go_version(const char *path, char *go_version, size_t go_version_size) +-{ +- int fd = open(path, O_RDONLY); +- char buffer[1024]; +- off_t offset; +- size_t num_sections, opt_header_size, i; +- char *p = NULL, *q; +- ssize_t res = -1; +- +- if (fd < 0) +- return -1; +- +- if (read_in_full(fd, buffer, 2) < 0) +- goto fail; +- +- /* +- * Parse the PE file format, for more details, see +- * https://en.wikipedia.org/wiki/Portable_Executable#Layout and +- * https://learn.microsoft.com/en-us/windows/win32/debug/pe-format +- */ +- if (buffer[0] != 'M' || buffer[1] != 'Z') +- goto fail; +- +- if (read_at(fd, buffer, 0x3c, 4) < 0) +- goto fail; +- +- /* Read the `PE\0\0` signature and the COFF file header */ +- offset = le32(buffer); +- if (read_at(fd, buffer, offset, 24) < 0) +- goto fail; +- +- if (buffer[0] != 'P' || buffer[1] != 'E' || buffer[2] != '\0' || buffer[3] != '\0') +- goto fail; +- +- num_sections = le16(buffer + 6); +- opt_header_size = le16(buffer + 20); +- offset += 24; /* skip file header */ +- +- /* +- * Validate magic number 0x10b or 0x20b, for full details see +- * https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#optional-header-standard-fields-image-only +- */ +- if (read_at(fd, buffer, offset, 2) < 0 || +- ((i = le16(buffer)) != 0x10b && i != 0x20b)) +- goto fail; +- +- offset += opt_header_size; +- +- for (i = 0; i < num_sections; i++) { +- if (read_at(fd, buffer, offset + i * 40, 40) < 0) +- goto fail; +- +- /* +- * For full details about the section headers, see +- * https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-table-section-headers +- */ +- if ((le32(buffer + 36) /* characteristics */ & ~0x600000) /* IMAGE_SCN_ALIGN_32BYTES */ == +- (/* IMAGE_SCN_CNT_INITIALIZED_DATA */ 0x00000040 | +- /* IMAGE_SCN_MEM_READ */ 0x40000000 | +- /* IMAGE_SCN_MEM_WRITE */ 0x80000000)) { +- size_t size = le32(buffer + 16); /* "SizeOfRawData " */ +- size_t pointer = le32(buffer + 20); /* "PointerToRawData " */ +- +- /* +- * Skip the section if either size or pointer is 0, see +- * https://github.com/golang/go/blob/go1.21.0/src/debug/buildinfo/buildinfo.go#L333 +- * for full details. +- * +- * Merely seeing a non-zero size will not actually do, +- * though: he size must be at least `buildInfoSize`, +- * i.e. 32, and we expect a UVarint (at least another +- * byte) _and_ the bytes representing the string, +- * which we expect to start with the letters "go" and +- * continue with the Go version number. +- */ +- if (size < 32 + 1 + 2 + 1 || !pointer) +- continue; +- +- p = malloc(size); +- +- if (!p || read_at(fd, p, pointer, size) < 0) +- goto fail; +- +- /* +- * Look for the build information embedded by Go, see +- * https://github.com/golang/go/blob/go1.21.0/src/debug/buildinfo/buildinfo.go#L165-L175 +- * for full details. +- * +- * Note: Go contains code to enforce alignment along a +- * 16-byte boundary. In practice, no `.exe` has been +- * observed that required any adjustment, therefore +- * this here code skips that logic for simplicity. +- */ +- q = memmem(p, size - 18, "\xff Go buildinf:", 14); +- if (!q) +- goto fail; +- /* +- * Decode the build blob. For full details, see +- * https://github.com/golang/go/blob/go1.21.0/src/debug/buildinfo/buildinfo.go#L177-L191 +- * +- * Note: The `endianness` values observed in practice +- * were always 2, therefore the complex logic to handle +- * any other value is skipped for simplicty. +- */ +- if ((q[14] == 8 || q[14] == 4) && q[15] == 2) { +- /* +- * Only handle a Go version string with fewer +- * than 128 characters, so the Go UVarint at +- * q[32] that indicates the string's length must +- * be only one byte (without the high bit set). +- */ +- if ((q[32] & 0x80) || +- !q[32] || +- (q + 33 + q[32] - p) > (ssize_t)size || +- q[32] + 1 > (ssize_t)go_version_size) +- goto fail; +- res = q[32]; +- memcpy(go_version, q + 33, res); +- go_version[res] = '\0'; +- break; +- } +- } +- } +- +-fail: +- free(p); +- close(fd); +- return res; +-} +- +-void win32_warn_about_git_lfs_on_windows7(int exit_code, const char *argv0) +-{ +- char buffer[128], *git_lfs = NULL; +- const char *p; +- +- /* +- * Git LFS v3.5.1 fails with an Access Violation on Windows 7; That +- * would usually show up as an exit code 0xc0000005. For some reason +- * (probably because at this point, we no longer have the _original_ +- * HANDLE that was returned by `CreateProcess()`) we observe other +- * values like 0xb00 and 0x2 instead. Since the exact exit code +- * seems to be inconsistent, we check for a non-zero exit status. +- */ +- if (exit_code == 0) +- return; +- if (GetVersion() >> 16 > 7601) +- return; /* Warn only on Windows 7 or older */ +- if (!istarts_with(argv0, "git-lfs ") && +- strcasecmp(argv0, "git-lfs")) +- return; +- if (!(git_lfs = locate_in_PATH("git-lfs"))) +- return; +- if (get_go_version(git_lfs, buffer, sizeof(buffer)) > 0 && +- skip_prefix(buffer, "go", &p) && +- versioncmp("1.21.0", p) <= 0) +- warning("This program was built with Go v%s\n" +- "i.e. without support for this Windows version:\n" +- "\n\t%s\n" +- "\n" +- "To work around this, you can download and install a " +- "working version from\n" +- "\n" +- "\thttps://github.com/git-lfs/git-lfs/releases/tag/" +- "v3.4.1\n", +- p, git_lfs); +- free(git_lfs); +-} + + ## config.mak.uname ## + remerge CONFLICT (content): Merge conflict in config.mak.uname + index ceea5e6f5b..32cc40e3cc 100644 + --- config.mak.uname + +++ config.mak.uname +@@ config.mak.uname: endif + CC = lib/compat/vcbuild/scripts/clink.pl + AR = lib/compat/vcbuild/scripts/lib.pl + CFLAGS = +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + BASIC_CFLAGS = -nologo -I. -Ilib/compat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE + COMPAT_OBJS = lib/compat/msvc.o lib/compat/winansi.o \ + lib/compat/win32/flush.o \ +@@ config.mak.uname: endif + COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY \ + -DENSURE_MSYSTEM_IS_SET="\"$(MSYSTEM)\"" -DMINGW_PREFIX="\"$(patsubst /%,%,$(MINGW_PREFIX))\"" \ + -DNOGDI -DHAVE_STRING_H -Ilib/compat -Ilib/compat/regex -Ilib/compat/win32 -DSTRIP_EXTENSION=\".exe\" +-======= +- BASIC_CFLAGS = -nologo -I. -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE +- COMPAT_OBJS = compat/msvc.o compat/winansi.o \ +- compat/win32/flush.o \ +- compat/win32/path-utils.o \ +- compat/win32/pthread.o compat/win32/syslog.o \ +- compat/win32/trace2_win32_process_info.o \ +- compat/win32/dirent.o compat/win32/fscache.o compat/win32/wsl.o +- COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY \ +- -DENSURE_MSYSTEM_IS_SET="\"$(MSYSTEM)\"" -DMINGW_PREFIX="\"$(patsubst /%,%,$(MINGW_PREFIX))\"" \ +- -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO + # invalidcontinue.obj allows Git's source code to close the same file + # handle twice, or to access the osfhandle of an already-closed stdout +@@ config.mak.uname: endif + EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj kernel32.lib ntdll.lib + GITLIBS += git.res + PTHREAD_LIBS = +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + RC = lib/compat/vcbuild/scripts/rc.pl +-======= +- RC = compat/vcbuild/scripts/rc.pl +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + lib = + BASIC_CFLAGS += $(vcpkg_inc) $(sdk_includes) $(msvc_includes) + ifndef DEBUG +@@ config.mak.uname: ifeq ($(uname_S),MINGW) + CSPRNG_METHOD = rtlgenrandom + BASIC_LDFLAGS += -municode -Wl,--tsaware + LAZYLOAD_LIBCURL = YesDoThatPlease +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + COMPAT_CFLAGS += -DNOGDI -Ilib/compat -Ilib/compat/win32 + COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" + COMPAT_OBJS += lib/compat/mingw.o lib/compat/winansi.o \ +@@ config.mak.uname: ifeq ($(uname_S),MINGW) + lib/compat/win32/path-utils.o \ + lib/compat/win32/pthread.o lib/compat/win32/syslog.o \ + lib/compat/win32/dirent.o lib/compat/win32/fscache.o lib/compat/win32/wsl.o +-======= +- COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32 +- COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" +- COMPAT_OBJS += compat/mingw.o compat/winansi.o \ +- compat/win32/trace2_win32_process_info.o \ +- compat/win32/flush.o \ +- compat/win32/path-utils.o \ +- compat/win32/pthread.o compat/win32/syslog.o \ +- compat/win32/dirent.o compat/win32/fscache.o compat/win32/wsl.o +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + BASIC_CFLAGS += -DWIN32 + EXTLIBS += -lws2_32 + GITLIBS += git.res + + ## contrib/buildsystems/CMakeLists.txt ## + remerge CONFLICT (content): Merge conflict in contrib/buildsystems/CMakeLists.txt + index df56eaf114..e95bddbc82 100644 + --- contrib/buildsystems/CMakeLists.txt + +++ contrib/buildsystems/CMakeLists.txt +@@ contrib/buildsystems/CMakeLists.txt: if(NOT DEFINED CMAKE_EXPORT_COMPILE_COMMANDS) + endif() + + if(USE_VCPKG) +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/lib/compat/vcbuild/vcpkg") +-======= +- set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg") +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + message("WIN32: ${WIN32}") # show its underlying text values + message("VCPKG_DIR: ${VCPKG_DIR}") + message("VCPKG_ARCH: ${VCPKG_ARCH}") # maybe unset +@@ contrib/buildsystems/CMakeLists.txt: if(USE_VCPKG) + message("ENV(CMAKE_EXPORT_COMPILE_COMMANDS): $ENV{CMAKE_EXPORT_COMPILE_COMMANDS}") + if(NOT EXISTS ${VCPKG_DIR}) + message("Initializing vcpkg and building the Git's dependencies (this will take a while...)") +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + execute_process(COMMAND ${CMAKE_SOURCE_DIR}/lib/compat/vcbuild/vcpkg_install.bat ${VCPKG_ARCH}) +-======= +- execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat ${VCPKG_ARCH}) +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + endif() + if(NOT EXISTS ${VCPKG_ARCH}) + message("VCPKG_ARCH: unset, using 'x64-windows'") +@@ contrib/buildsystems/CMakeLists.txt: endif() + + #default behaviour + include_directories(${CMAKE_SOURCE_DIR}) +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + include_directories(${CMAKE_SOURCE_DIR}/lib) +-======= +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + + # When cross-compiling, define HOST_CPU as the canonical name of the CPU on + # which the built Git will run (for instance "x86_64"). +@@ contrib/buildsystems/CMakeLists.txt: if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + add_compile_definitions(ENSURE_MSYSTEM_IS_SET="MINGW32" MINGW_PREFIX="mingw32") + endif() + list(APPEND compat_SOURCES +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + lib/compat/mingw.c + lib/compat/winansi.c + lib/compat/win32/flush.c +@@ contrib/buildsystems/CMakeLists.txt: if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + lib/compat/win32/wsl.c + lib/compat/strdup.c + lib/compat/win32/fscache.c) +-======= +- compat/mingw.c +- compat/winansi.c +- compat/win32/flush.c +- compat/win32/path-utils.c +- compat/win32/pthread.c +- compat/win32mmap.c +- compat/win32/syslog.c +- compat/win32/trace2_win32_process_info.c +- compat/win32/dirent.c +- compat/win32/wsl.c +- compat/strdup.c +- compat/win32/fscache.c) +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + set(NO_UNIX_SOCKETS 1) - reftable_set_alloc(malloc, realloc, free); + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") +@@ contrib/buildsystems/CMakeLists.txt: if(WIN32) + message(FATAL_ERROR "Unhandled compiler: ${CMAKE_C_COMPILER_ID}") + endif() -+ reftable_set_alloc(malloc, realloc, free); -+ - refs_compute_filesystem_location(gitdir, payload, &is_worktree, &refdir, - &ref_common_dir); +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + add_executable(headless-git ${CMAKE_SOURCE_DIR}/lib/compat/win32/headless.c) +-======= +- add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c) +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + list(APPEND PROGRAMS_BUILT headless-git) + if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows) +@@ contrib/buildsystems/CMakeLists.txt: string(REPLACE "@USE_LIBPCRE2@" "" git_build_options "${git_build_options}") + string(REPLACE "@WITH_BREAKING_CHANGES@" "" git_build_options "${git_build_options}") + string(REPLACE "@X@" "${EXE_EXTENSION}" git_build_options "${git_build_options}") + if(USE_VCPKG) +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../lib/compat/vcbuild/vcpkg/installed/${VCPKG_ARCH}/bin\"\n") +-======= +- string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/${VCPKG_ARCH}/bin\"\n") +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + endif() + file(WRITE ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS ${git_build_options}) + ## lib/compat/vcbuild/README ## + remerge CONFLICT (content): Merge conflict in lib/compat/vcbuild/README + index 811a8dbf7a..2531650b18 100644 + --- lib/compat/vcbuild/README + +++ lib/compat/vcbuild/README +@@ lib/compat/vcbuild/README: The Steps to Build Git with VS2015 or VS2017 from the command line. + Prompt or from an SDK bash window: + + $ cd <repo_root> +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)):lib/compat/vcbuild/README + $ ./lib/compat/vcbuild/vcpkg_install.bat x64-windows + + or + + $ ./lib/compat/vcbuild/vcpkg_install.bat arm64-windows +-======= +- $ ./compat/vcbuild/vcpkg_install.bat x64-windows +- +- or +- +- $ ./compat/vcbuild/vcpkg_install.bat arm64-windows +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input):compat/vcbuild/README + + The vcpkg tools and all of the third-party sources will be installed + in this folder: + + ## lib/git-compat-util.h ## + remerge CONFLICT (content): Merge conflict in lib/git-compat-util.h + index 2c235f4b89..1e09c0775c 100644 + --- lib/git-compat-util.h + +++ lib/git-compat-util.h +@@ lib/git-compat-util.h: struct fscache; + #ifndef enable_fscache + #define enable_fscache(x) /* noop */ + #endif +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)):lib/git-compat-util.h + #ifndef flush_fscache + #define flush_fscache() /* noop */ + #endif +-======= +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input):git-compat-util.h + + #ifndef disable_fscache + #define disable_fscache() /* noop */ + + ## meson.build ## + remerge CONFLICT (content): Merge conflict in meson.build + index 3507b27fc1..d8c56a0c82 100644 + --- meson.build + +++ meson.build +@@ meson.build: if host_machine.system() == 'cygwin' + ] + elif host_machine.system() == 'windows' + compat_sources += [ +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + 'lib/compat/winansi.c', + 'lib/compat/win32/dirent.c', + 'lib/compat/win32/flush.c', +@@ meson.build: elif host_machine.system() == 'windows' + 'lib/compat/win32/syslog.c', + 'lib/compat/win32/wsl.c', + 'lib/compat/win32mmap.c', +-======= +- 'compat/winansi.c', +- 'compat/win32/dirent.c', +- 'compat/win32/flush.c', +- 'compat/win32/fscache.c', +- 'compat/win32/path-utils.c', +- 'compat/win32/pthread.c', +- 'compat/win32/syslog.c', +- 'compat/win32/wsl.c', +- 'compat/win32mmap.c', +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + ] + + libgit_c_args += [ + + ## meson_options.txt ## + remerge CONFLICT (content): Merge conflict in meson_options.txt + index 699f72ea90..427697f5f7 100644 + --- meson_options.txt + +++ meson_options.txt +@@ meson_options.txt: option('runtime_prefix', type: 'boolean', value: false, + description: 'Resolve ancillary tooling and support files relative to the location of the runtime binary instead of hard-coding them into the binary.') + option('sane_tool_path', type: 'array', value: [], + description: 'An array of paths to pick up tools from in case the normal tools are broken or lacking.') +-<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + option('nanosec', type: 'boolean', value: false, + description: 'Care about sub-second file mtimes and ctimes.') +-======= +->>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + option('msystem', type: 'string', value: '', + description: 'Fall-back on Windows when MSYSTEM is not set.') + option('mingw_prefix', type: 'string', value: '', + + ## odb/source-files.c (deleted) ## + remerge CONFLICT (modify/delete): odb/source-files.c deleted in da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) and modified in c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input). Version c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) of odb/source-files.c left in tree. + index 3b1261eba9..0000000000 + --- odb/source-files.c + +++ /dev/null +@@ +-#include "git-compat-util.h" +-#include "abspath.h" +-#include "chdir-notify.h" +-#include "gettext.h" +-#include "lockfile.h" +-#include "object-file.h" +-#include "odb.h" +-#include "odb/source.h" +-#include "odb/source-files.h" +-#include "odb/source-loose.h" +-#include "packfile.h" +-#include "strbuf.h" +-#include "write-or-die.h" +- +-static void odb_source_files_reparent(const char *name UNUSED, +- const char *old_cwd, +- const char *new_cwd, +- void *cb_data) +-{ +- struct odb_source_files *files = cb_data; +- char *path = reparent_relative_path(old_cwd, new_cwd, +- files->base.path); +- free(files->base.path); +- files->base.path = path; +-} +- +-static void odb_source_files_free(struct odb_source *source) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- chdir_notify_unregister(NULL, odb_source_files_reparent, files); +- odb_source_free(&files->loose->base); +- packfile_store_free(files->packed); +- odb_source_release(&files->base); +- free(files); +-} +- +-static void odb_source_files_close(struct odb_source *source) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- odb_source_close(&files->loose->base); +- packfile_store_close(files->packed); +-} +- +-static void odb_source_files_reprepare(struct odb_source *source) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- odb_source_reprepare(&files->loose->base); +- packfile_store_reprepare(files->packed); +-} +- +-static int odb_source_files_read_object_info(struct odb_source *source, +- const struct object_id *oid, +- struct object_info *oi, +- enum object_info_flags flags) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- +- if (!packfile_store_read_object_info(files->packed, oid, oi, flags) || +- !odb_source_read_object_info(&files->loose->base, oid, oi, flags)) +- return 0; +- +- return -1; +-} +- +-static int odb_source_files_read_object_stream(struct odb_read_stream **out, +- struct odb_source *source, +- const struct object_id *oid) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- if (!packfile_store_read_object_stream(out, files->packed, oid) || +- !odb_source_read_object_stream(out, &files->loose->base, oid)) +- return 0; +- return -1; +-} +- +-static int odb_source_files_for_each_object(struct odb_source *source, +- const struct object_info *request, +- odb_for_each_object_cb cb, +- void *cb_data, +- const struct odb_for_each_object_options *opts) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- int ret; +- +- if (!(opts->flags & ODB_FOR_EACH_OBJECT_PROMISOR_ONLY)) { +- ret = odb_source_for_each_object(&files->loose->base, request, cb, cb_data, opts); +- if (ret) +- return ret; +- } +- +- ret = packfile_store_for_each_object(files->packed, request, cb, cb_data, opts); +- if (ret) +- return ret; +- +- return 0; +-} +- +-static int odb_source_files_count_objects(struct odb_source *source, +- enum odb_count_objects_flags flags, +- unsigned long *out) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- unsigned long count; +- int ret; +- +- ret = packfile_store_count_objects(files->packed, flags, &count); +- if (ret < 0) +- goto out; +- +- if (!(flags & ODB_COUNT_OBJECTS_APPROXIMATE)) { +- unsigned long loose_count; +- +- ret = odb_source_count_objects(&files->loose->base, flags, &loose_count); +- if (ret < 0) +- goto out; +- +- count += loose_count; +- } +- +- *out = count; +- ret = 0; +- +-out: +- return ret; +-} +- +-static int odb_source_files_find_abbrev_len(struct odb_source *source, +- const struct object_id *oid, +- unsigned min_len, +- unsigned *out) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- unsigned len = min_len; +- int ret; +- +- ret = packfile_store_find_abbrev_len(files->packed, oid, len, &len); +- if (ret < 0) +- goto out; +- +- ret = odb_source_find_abbrev_len(&files->loose->base, oid, len, &len); +- if (ret < 0) +- goto out; +- +- *out = len; +- ret = 0; +- +-out: +- return ret; +-} +- +-static int odb_source_files_freshen_object(struct odb_source *source, +- const struct object_id *oid) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- if (packfile_store_freshen_object(files->packed, oid) || +- odb_source_freshen_object(&files->loose->base, oid)) +- return 1; +- return 0; +-} +- +-static int odb_source_files_write_object(struct odb_source *source, +- const void *buf, size_t len, +- enum object_type type, +- struct object_id *oid, +- struct object_id *compat_oid, +- enum odb_write_object_flags flags) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- return odb_source_write_object(&files->loose->base, buf, len, type, +- oid, compat_oid, flags); +-} +- +-static int odb_source_files_write_object_stream(struct odb_source *source, +- struct odb_write_stream *stream, +- size_t len, +- struct object_id *oid) +-{ +- struct odb_source_files *files = odb_source_files_downcast(source); +- return odb_source_write_object_stream(&files->loose->base, stream, len, oid); +-} +- +-static int odb_source_files_begin_transaction(struct odb_source *source, +- struct odb_transaction **out) +-{ +- struct odb_transaction *tx = odb_transaction_files_begin(source); +- if (!tx) +- return -1; +- *out = tx; +- return 0; +-} +- +-static int odb_source_files_read_alternates(struct odb_source *source, +- struct strvec *out) +-{ +- struct strbuf buf = STRBUF_INIT; +- char *path; +- +- path = xstrfmt("%s/info/alternates", source->path); +- if (strbuf_read_file(&buf, path, 1024) < 0) { +- warn_on_fopen_errors(path); +- free(path); +- return 0; +- } +- parse_alternates(buf.buf, '\n', source->path, out); +- +- strbuf_release(&buf); +- free(path); +- return 0; +-} +- +-static int odb_source_files_write_alternate(struct odb_source *source, +- const char *alternate) +-{ +- struct lock_file lock = LOCK_INIT; +- char *path = xstrfmt("%s/%s", source->path, "info/alternates"); +- FILE *in, *out; +- int found = 0; +- int ret; +- +- hold_lock_file_for_update(&lock, path, LOCK_DIE_ON_ERROR); +- out = fdopen_lock_file(&lock, "w"); +- if (!out) { +- ret = error_errno(_("unable to fdopen alternates lockfile")); +- goto out; +- } +- +- in = fopen(path, "r"); +- if (in) { +- struct strbuf line = STRBUF_INIT; +- +- while (strbuf_getline(&line, in) != EOF) { +- if (!strcmp(alternate, line.buf)) { +- found = 1; +- break; +- } +- fprintf_or_die(out, "%s\n", line.buf); +- } +- +- strbuf_release(&line); +- fclose(in); +- } else if (errno != ENOENT) { +- ret = error_errno(_("unable to read alternates file")); +- goto out; +- } +- +- if (found) { +- rollback_lock_file(&lock); +- } else { +- fprintf_or_die(out, "%s\n", alternate); +- if (commit_lock_file(&lock)) { +- ret = error_errno(_("unable to move new alternates file into place")); +- goto out; +- } +- } +- +- ret = 0; +- +-out: +- free(path); +- return ret; +-} +- +-struct odb_source_files *odb_source_files_new(struct object_database *odb, +- const char *path, +- bool local) +-{ +- struct odb_source_files *files; +- +- CALLOC_ARRAY(files, 1); +- odb_source_init(&files->base, odb, ODB_SOURCE_FILES, path, local); +- files->loose = odb_source_loose_new(odb, path, local); +- files->packed = packfile_store_new(&files->base); +- +- files->base.free = odb_source_files_free; +- files->base.close = odb_source_files_close; +- files->base.reprepare = odb_source_files_reprepare; +- files->base.read_object_info = odb_source_files_read_object_info; +- files->base.read_object_stream = odb_source_files_read_object_stream; +- files->base.for_each_object = odb_source_files_for_each_object; +- files->base.count_objects = odb_source_files_count_objects; +- files->base.find_abbrev_len = odb_source_files_find_abbrev_len; +- files->base.freshen_object = odb_source_files_freshen_object; +- files->base.write_object = odb_source_files_write_object; +- files->base.write_object_stream = odb_source_files_write_object_stream; +- files->base.begin_transaction = odb_source_files_begin_transaction; +- files->base.read_alternates = odb_source_files_read_alternates; +- files->base.write_alternate = odb_source_files_write_alternate; +- +- /* +- * Ideally, we would only ever store absolute paths in the source. This +- * is not (yet) possible though because we access and assume relative +- * paths in the primary ODB source in some user-facing functionality. +- */ +- if (!is_absolute_path(path)) +- chdir_notify_register(NULL, odb_source_files_reparent, files); +- +- return files; +-} + ## t/t1007-hash-object.sh ## + remerge CONFLICT (content): Merge conflict in t/t1007-hash-object.sh + index de04d0f9bd..463b38f990 100755 + --- t/t1007-hash-object.sh + +++ t/t1007-hash-object.sh @@ t/t1007-hash-object.sh: test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ # This clean filter does nothing, other than excercising the interface. # We ensure that cleaning doesn't mangle large files on 64-bit Windows. +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) -test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ -+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ +-================================ + test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) 'hash filtered files over 4GB correctly' ' { test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } && test_oid large5GB >expect && + + ## t/t1517-outside-repo.sh ## + remerge CONFLICT (content): Merge conflict in t/t1517-outside-repo.sh + index 59a9fce768..efbac29c0e 100755 + --- t/t1517-outside-repo.sh + +++ t/t1517-outside-repo.sh +@@ t/t1517-outside-repo.sh: do + http-backend | http-fetch | http-push | init-db | \ + mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \ + remote-http | remote-https | replay | send-email | \ +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + sh-i18n--envsubst | shell | show | stage | survey | \ + upload-archive--writer | upload-pack | whatchanged) + h_expect_outcome=expect_failure +@@ t/t1517-outside-repo.sh: do + h_expect_outcome=expect_success + all_expect_outcome=expect_failure + ;; +-================================ +- sh-i18n--envsubst | shell | show | stage | submodule | survey | svn | \ +- upload-archive--writer | upload-pack | web--browse | whatchanged) +- expect_outcome=expect_failure ;; +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + *) + h_expect_outcome=expect_success + all_expect_outcome=expect_success + + ## t/t6403-merge-file.sh ## + remerge CONFLICT (content): Merge conflict in t/t6403-merge-file.sh + index 8272fb1c6e..bd58e471bc 100755 + --- t/t6403-merge-file.sh + +++ t/t6403-merge-file.sh +@@ t/t6403-merge-file.sh: test_expect_success "expected conflict markers" ' + test_expect_success 'binary files cannot be merged' ' + test_must_fail git merge-file -p \ + orig.txt "$TEST_DIRECTORY"/lib-diff/test-binary-1.png new1.txt 2> merge.err && +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< da83762276 (build(deps): bump actions/cache from 5 to 6 (#6303)) + test_grep "Cannot merge binary files" merge.err +-================================ +- grep "Cannot merge binary files" merge.err +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> c8dff95af8 (fixup! hash-object: add a >4GB/LLP64 test case using filtered input) + ' + + test_expect_success 'binary files cannot be merged with --object-id' 'To: 22d499324d (Turn
git surveyinto a deprecated shim overgit repo structure(git-for-windows#6268), 2026-07-08) (9dd6c86b36..22d499324d)Statistics
Range-diff (click to expand)
1: c427eb9 = 1: 24ebd01 mingw: skip symlink type auto-detection for network share targets
2: 482184f = 2: 8c13a80 unix-socket: avoid leak when initialization fails
3: 9cf5d31 = 3: 1ca4dd3 Merge branch 'prevent-accidental-ntlm-exfiltration-via-symlinks'
4: cafe2f3 = 4: 0d9a442 grep: prevent
^$false match at end of file5: b16e7bd = 5: 3a9d685 Merge branch 'v2.53.0.windows.3'
6: a019c3c = 6: 228bb53 Merge branch 'fixes-from-the-git-mailing-list'
7: 7859f2f = 7: d0cb5fd ci(vs-build): adapt to Visual Studio 2026 default on windows-latest
8: 5dadd9a = 8: 9902c9d vcpkg_install: detect lack of Git
9: 98cf3a1 = 9: 25f0f58 vcpkg_install: add comment regarding slow network connections
10: c88808e = 10: 0816948 vcbuild: install ARM64 dependencies when building ARM64 binaries
11: ee1bb35 = 11: 41700c0 vcbuild: add an option to install individual 'features'
12: 17f5fcb = 12: 939d363 cmake: allow building for Windows/ARM64
13: 7e9e33e = 13: 7d8f851 ci(vs-build) also build Windows/ARM64 artifacts
14: 9f05af2 = 14: 04cd55c vcbuild: stop hard-coding OpenSSL as a dependency
15: 6704995 = 15: cbe02ef cmake(): allow setting HOST_CPU for cross-compilation
16: 73765e1 = 16: 271154f t9350: point out that refs are not updated correctly
17: d4cffcb = 17: e532399 CMake: default Visual Studio generator has changed
18: 3466936 = 18: 76d966a transport-helper: add trailing --
19: 0d44445 = 19: 51a9381 mingw: demonstrate a
git addissue with NTFS junctions20: 3f8e400 = 20: 4cbe37d .gitignore: add Visual Studio CMakeSetting.json file
21: 8d3df17 = 21: 46f13b5 t5505/t5516: allow running without
.git/branches/in the templates22: 92f2298 = 22: 25b9922 remote-helper: check helper status after import/export
23: c6cc59c = 23: 8cb42d7 strbuf_realpath(): use platform-dependent API if available
24: adfa6b2 = 24: 1f6d7e8 http: use new "best effort" strategy for Secure Channel revoke checking
25: f01da97 = 25: 9097873 subtree: update
contrib/subtreetesttarget26: 95c7af4 = 26: b68b901 CMakeLists: add default "x64-windows" arch for Visual Studio
27: a01c480 = 27: 0e2d30d hash-object: add another >4GB/LLP64 test case
28: fe73464 = 28: a4c0c31 setup: properly use "%(prefix)/" when in WSL
29: 5866f77 = 29: a833689 Add config option
windows.appendAtomically30: 5d66001 = 30: db6ed06 mingw: include the Python parts in the build
31: 0130f3f = 31: cc7a88b t5505/t5516: fix white-space around redirectors
33: a8cfaf9 = 32: 3cf1423 ci: bump actions/checkout from 6 to 7
34: 55facaa = 33: b996216 Always auto-gc after calling a fast-import transport
35: 4ad3589 = 34: 0da3bb7 mingw: prevent regressions with "drive-less" absolute paths
36: b0e5895 = 35: 7c823ed transport: optionally disable side-band-64k
37: ee5faa7 = 36: 97244d5 mingw: fix fatal error working on mapped network drives on Windows
38: 084e0c1 = 37: 7cba294 clink.pl: fix MSVC compile script to handle libcurl-d.lib
39: 7a6b321 = 38: 10bf9e0 mingw: implement a platform-specific
strbuf_realpath()40: 9f56682 = 39: 42eca26 t3701: verify that we can add lots of files interactively
41: 92ae8bc = 40: 14bf942 commit: accept "scissors" with CR/LF line endings
42: c8c004f = 41: 4db87fb t0014: fix indentation
43: 7eae0c3 = 42: 7dbf2e4 git-gui: accommodate for intent-to-add files
44: f0cb3df = 43: f7fd7c5 mingw: allow for longer paths in
parse_interpreter()45: a355d92 = 44: 4843634 compat/vcbuild: document preferred way to build in Visual Studio
46: 34120b0 = 45: d09d3ac http: optionally send SSL client certificate
47: a1fd77c = 46: 7e11c3d ci: run
contrib/subtreetests in CI builds48: dce4af4 = 47: 7c05ebd CMake: show Win32 and Generator_platform build-option values
49: e6ecdbe = 48: be6820a hash-object: add a >4GB/LLP64 test case using filtered input
50: 35c663f = 49: 4563a1d compat/mingw.c: do not warn when failing to get owner
51: aac90d7 = 50: 772f975 mingw: $env:TERM="xterm-256color" for newer OSes
52: 381e2f7 = 51: a6d826b winansi: check result and Buffer before using Name
53: 64c624a = 52: 17c3f97 mingw: change core.fsyncObjectFiles = 1 by default
54: c237ccc = 53: a62dbee windows: skip linking
git-<command>for built-ins55: 4c9e040 = 54: dc0aa24 mingw: stop hard-coding
CC = gcc56: fe1dbc4 = 55: 5ec8f11 mingw: drop the -D_USE_32BIT_TIME_T option
57: c3c49f7 = 56: 9341ca4 mingw: only use -Wl,--large-address-aware for 32-bit builds
58: b630506 = 57: 3aaa64c mingw: avoid over-specifying
--pic-executable59: 185d7a6 = 58: fa53268 mingw: set the prefix and HOST_CPU as per MSYS2's settings
60: 4ffd781 = 59: be1cac9 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
61: 11d788b = 60: fb1dd68 mingw: rely on MSYS2's metadata instead of hard-coding it
62: 3cc0ab4 = 61: c5432d4 mingw: always define
ETC_*for MSYS2 environments63: 78e7c64 = 62: b75cb6b max_tree_depth: lower it for clang builds in general on Windows
64: f9a1683 = 63: 154b03f mingw: ensure valid CTYPE
65: 47ee87c = 64: 8c4a857 mingw: allow
git.exeto be used instead of the "Git wrapper"66: 795d2f6 = 65: 29f6cd9 revision: create mark_trees_uninteresting_dense()
67: 5c04c9d = 66: 9e7ae94 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
68: 01d24f1 = 67: dab4635 survey: stub in new experimental 'git-survey' command
69: 7eb2970 = 68: d666159 Merge branch 'dscho-avoid-d-f-conflict-in-vs-master'
70: 3689b24 = 69: 4411d50 survey: add command line opts to select references
71: 5330cb5 = 70: 0631ab7 clink.pl: fix libexpatd.lib link error when using MSVC
72: 92dbf2c = 71: 311aca0 survey: start pretty printing data in table form
73: 568dc0e = 72: edcdd61 Makefile: clean up .ilk files when MSVC=1
74: 4612c9f = 73: 35c4d2e survey: add object count summary
75: cd9784e = 74: f489795 vcbuild: add support for compiling Windows resource files
76: 588ad26 = 75: d037386 survey: summarize total sizes by object type
77: e2b4834 = 76: 57ff685 config.mak.uname: add git.rc to MSVC builds
32: 406ac23 = 77: 145081e MinGW: link as terminal server aware
78: c809357 = 78: d05cc7b survey: show progress during object walk
79: 7a28e86 = 79: b54b4eb mingw: make sure
errnois set correctly when socket operations fail81: e5944df = 80: 7fadc3f clink.pl: ignore no-stack-protector arg on MSVC=1 builds
82: ccf9ac4 = 81: cc2942b http: optionally load libcurl lazily
83: eef9180 = 82: 903b744 survey: add ability to track prioritized lists
84: 55a8880 = 83: 805232a compat/mingw: handle WSA errors in strerror
80: e9f5e78 = 84: e5b5152 t5563: verify that NTLM authentication works
86: 08700b5 = 85: eb4ee61 clink.pl: move default linker options for MSVC=1 builds
87: a949a34 = 86: 803d3ae http: support lazy-loading libcurl also on Windows
88: a611ee2 = 87: 9467bff survey: add report of "largest" paths
89: 635f11c = 88: 578dc78 compat/mingw: drop outdated comment
85: e6d5a27 = 89: cbe8c2d http: disallow NTLM authentication by default
91: fb21c55 = 90: 04f0af6 cmake: install headless-git.
92: 82173ee = 91: a154ff2 http: when loading libcurl lazily, allow for multiple SSL backends
93: 7ca0cd3 = 92: ddc06ec survey: add --top= option and config
94: a194569 = 93: 4f015c7 t0301: actually test credential-cache on Windows
90: 1ad38a0 = 94: 39acaa0 http: warn if might have failed because of NTLM
96: a14691e = 95: 5197eee Fix Windows version resources
97: e05c351 = 96: 87cfa5e status: fix for old-style submodules with commondir
98: fdc2b1f = 97: 417b721 git.rc: include winuser.h
99: 2b4d914 = 98: ca38450 mingw: do load libcurl dynamically by default
100: 7299456 = 99: 08b18bf Add a GitHub workflow to verify that Git/Scalar work in Nano Server
101: 24672b6 = 100: 2df3f96 mingw: suggest
windows.appendAtomicallyin more cases102: bec0948 = 101: ae9e6a9 win32: use native ANSI sequence processing, if possible
103: 8238f2a = 102: a7eba84 common-main.c: fflush stdout buffer upon exit
104: ef6dfbc = 103: f4cd16e t5601/t7406(mingw): do run tests with symlink support
105: caad85a = 104: 401cb5e Fallback to AppData if XDG_CONFIG_HOME is unset
106: 6f300b9 = 105: b4547c0 run-command: be helpful with Git LFS fails on Windows 7
107: 524b7c1 = 106: b24665f survey: clearly note the experimental nature in the output
108: 23589fb = 107: ed6eaa1 credential-cache: handle ECONNREFUSED gracefully
109: 59e02f1 = 108: 35faec1 reftable: do make sure to use custom allocators
110: 281ae27 = 109: c4e3f48 check-whitespace: avoid alerts about upstream commits
111: 18b6b8a = 110: 8160347 t/t5571-prep-push-hook.sh: Add test with writing to stderr
112: 99dbf48 = 111: 8ef800e diff-delta: widen struct delta_index size fields to size_t
113: 1875700 = 112: 59e8f78 delta: widen create_delta_index() parameter to size_t
114: f696a0e = 113: 6a58155 pack-objects: widen delta-cache accounting to size_t
115: 3ca1e88 = 114: 862f62a pack-objects: widen free_unpacked() return to size_t
116: 52bd935 = 115: 632e820 pack-objects: widen mem_usage and try_delta out-param to size_t
117: c13dc00 = 116: 1d4d03f delta: widen create_delta() and diff_delta() to size_t
118: 74837fc ! 117: 4b8d4b3 packfile, git-zlib: widen use_pack() and zstream avail fields to size_t
119: 5aa96d8 = 118: 5c3dce4 archive-zip: widen zlib_deflate_raw()'s maxsize local to size_t
120: 0b3c57f = 119: df977fd diff: widen deflate_it()'s bound local from int to size_t
121: 0e76c52 = 120: a170d32 http-push: widen start_put()'s size local from ssize_t to size_t
122: 76647ba = 121: 2b9d2d3 t/helper/test-pack-deltas: widen do_compress()'s maxsize local to size_t
123: 5279ff4 = 122: f7e07a0 mingw: Support
git_terminal_promptwith more terminals124: fadc02a = 123: f7f1f84 git-zlib: widen git_deflate_bound() to size_t
125: 5578cf1 = 124: f4c110a compat/terminal.c: only use the Windows console if bash 'read -r' fails
126: 681e511 = 125: 9ebf494 diff: stop truncating the deflated-binary-diff size on Windows
127: f7462a6 = 126: 582b698 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
128: 74f71d8 = 127: c260dfa convert: widen gather_convert_stats() helpers to size_t
129: c9b02ef = 128: fd4fd14 Win32: symlink: move phantom symlink creation to a separate function
130: 1455308 = 129: dc551c8 read-cache: stop truncating index blob sizes on Windows
131: c049671 = 130: 0cec889 mingw: introduce code to detect whether we're inside a Windows container
132: 4f89601 = 131: 4416fa7 Introduce helper to create symlinks that knows about index_state
133: b174d43 = 132: f0c2859 xdiff-interface: widen buffer_is_binary() size parameter to size_t
134: 61631e8 = 133: 95a99e7 mingw: when running in a Windows container, try to rename() harder
135: 2299521 = 134: fc107f7 mingw: allow to specify the symlink type in .gitattributes
136: 78330bb = 135: 7190658 combine-diff: stop truncating combined-diff blob sizes on Windows
137: a5c1ead = 136: c32ddf6 mingw: move the file_attr_to_st_mode() function definition
138: b55848d = 137: f58cdfe Win32: symlink: add test for
symlinkattribute140: 0681b50 = 138: fbb06c3 diff: widen textconv_object() size out-param to size_t
95: 0c29ffc = 139: 26abbec credential: advertise NTLM suppression and allow helpers to re-enable
141: a66c3ee = 140: 5237e11 mingw: Windows Docker volumes are not symbolic links
142: 5e4e977 = 141: 09ecf19 clean: do not traverse mount points
143: 94a13f0 = 142: 887f94b pack-bitmap: stop truncating blob sizes used by --filter=blob:limit
145: 31f434d = 143: 150130a diffcore: widen struct diff_filespec.size to size_t
147: 7fda66b = 144: 8bd77dd dir: do not traverse mount points
148: 6fe05c3 = 145: 328dee1 win32: thread-utils: handle multi-socket systems
149: 90c19a7 = 146: 6e09563 t5563: add tests for http.emptyAuth with Negotiate
150: 0c5f0e1 = 147: ac7ed8b entry: flush fscache after creating directories and writing files
151: 8dc2531 = 148: 8dd7fc9 ci(macos): skip the
git p4tests152: 2441b33 = 149: 7170c75 mingw: work around rename() failing on a read-only file
153: c348826 = 150: 4e5734a clean: remove mount points when possible
154: 0ee9a2a = 151: e4dba70 mingw: optionally enable wsl compability file mode bits
155: 880117a = 152: e1763f0 Refuse to follow invalid paths in
.gitfiles139: 1c74b56 = 153: 88d5c5f tree-walk: drop link_len cast in get_tree_entry_follow_symlinks()
156: d6f6dab = 154: d639342 Merge branch 'size-t/pack-objects-delta'
144: 2208024 = 155: 876b7a3 tree-walk: widen init_tree_desc() and init_tree_desc_gently() to size_t
157: ef80f43 = 156: e1c2f55 Merge branch 'size-t/pack-bitmap'
158: 7e683eb = 157: 867b71a pack-objects: drop the two tree-walk casts in the preferred-base path
146: baca8bc = 158: abeec97 diff-delta: widen sizeof_delta_index() return to size_t
159: 8f3cfa5 = 159: 6b580d4 Merge branch 'size-t/diff'
160: d690d19 = 160: c6a643c tree: widen struct tree.size and parse_tree_buffer() to size_t
161: 4c35b0f = 161: 60c8312 Merge branch 'size-t/diff-delta-sizeof'
162: fe58c2c = 162: f34f668 commit: widen the commit-buffer API to size_t
163: e3693e4 = 163: 7ebc071 Merge branch 'size-t/tree'
164: daa9c9d = 164: 05b8b3e blame: widen find_line_starts() len parameter to size_t
165: 5ae5c9a = 165: 47d21e4 Merge branch 'size-t/commit'
166: 3180985 = 166: 46e32dd grep: widen struct grep_source.size and grep_buffer() to size_t
167: 8b54073 = 167: 863fbb8 Merge branch 'size-t/blame'
168: 20f3f5f = 168: b224f35 fast-export: drop the export_blob() size cast and widen anonymize_blob()
169: 43b3646 = 169: 1f21aeb Merge branch 'size-t/grep'
170: 2ec3139 = 170: 3607e8a repo: drop the inflated-size cast in count_objects()
171: 0f5c779 = 171: e41278d Merge branch 'size-t/fast-export'
172: ee1be44 = 172: 8c2fda1 unpack-objects: widen the size-passing infrastructure to size_t
173: 99f1aea = 173: 3378452 Merge branch 'size-t/repo'
174: c2c0370 = 174: 7fc4436 Merge branch 'size-t/unpack-objects'
175: 8a8ade3 = 175: c513e82 Merge branch 'topic/size-t' into size-t-followups
176: df68edc = 176: 3352d36 pack-objects: drop cast_size_t_to_ulong shims in get_delta()
177: f164d11 = 177: 97cfcc6 pack-objects: drop cast_size_t_to_ulong shims in try_delta()
178: b59a6ae = 178: a9192b5 pack-objects: drop the last size shim in write_no_reuse_object()
179: 7da1ac7 = 179: 4beeed0 blame: widen struct blame_scoreboard.final_buf_size to size_t
180: 6ed4c08 = 180: 6c168db fast-import: drop the six size casts in the object-read paths
181: 98b3ff2 = 181: 27666d5 t/helper/test-pack-deltas: drop the delta_size cast in write_ref_delta()
182: a49e7ea = 182: 0f416f5 Drop the
cast_size_t_to_ulong()helper183: 365e3c4 = 183: ecb3092 Merge branch 'topic/size-t' (size_t evacuation, upstream-bound)
184: aa2fe69 = 184: f568c49 Merge branch 'topic/size-t-followups' (size_t followups depending on seen topics)
185: 046c40c = 185: cb8e608 Merge branch 'bump-ci-actions/checkout-from-6-to-7'
186: 1568876 = 186: db5aee5 Merge 'remote-hg-prerequisites' into HEAD
187: 749214a = 187: 26e4254 Merge branch 'drive-prefix'
188: 4b6b28d = 188: 1990fad Merge branch 'msys2-python'
189: ac91c7d = 189: b4a2f73 Merge pull request Config option to disable side-band-64k for transport git#2375 from assarbad/reintroduce-sideband-config
190: ed974fc = 190: 6fba9c8 Merge pull request mingw: fix fatal error working on mapped network drives on Windows git#2488 from bmueller84/master
191: 5bb03ba = 191: caa1c48 Merge pull request clink.pl: fix MSVC compile script to handle libcurl-d.lib git#2501 from jeffhostetler/clink-debug-curl
193: 3f4a1cf = 192: efbca90 Merge pull request Handle
git add <file>where <file> traverses an NTFS junction git#2504 from dscho/access-repo-via-junction194: 0ce0634 = 193: e162182 Merge pull request Introduce and use the new "best effort" strategy for Secure Channel revoke checking git#2535 from dscho/schannel-revoke-best-effort
195: b4b5dad = 194: 7817fca Merge pull request ci: avoid d/f conflict in vs/master git#2618 from dscho/avoid-d/f-conflict-in-vs/master
196: 486f9a3 = 195: 6d1d800 Merge 'add-p-many-files'
197: 5e20504 = 196: d6cc14b Merge pull request Rationalize line endings for scissors-cleanup git#2714 from lbonanomi/crlf-scissors
198: 0e530c2 = 197: db3bae0 Merge pull request t/t0014: fix: eliminate additional lines from trace git#2655 from jglathe/jg/t0014_trace_extra_info
199: a935e88 = 198: b52f70a Merge 'git-gui/js/intent-to-add'
200: 3a465e2 = 199: d901d21 Merge pull request Vcpkg Install: detect lack of working Git, and note possible vcpkg time outs git#2351 from PhilipOakley/vcpkg-tip
201: 21b6c1b = 200: a2e4ded Merge pull request Windows arm64 support git#2915 from dennisameling/windows-arm64-support
202: b99cd29 = 201: 69f05a4 Merge pull request cmake(): allow setting HOST_CPU for cross-compilation git#3327 from dennisameling/fix-host-cpu
203: 081598c = 202: 1c8dd8b Merge pull request mingw: allow for longer paths in
parse_interpreter()git#3165 from dscho/increase-allowed-length-of-interpreter-path204: d632452 = 203: 0bd1682 Merge pull request Let the documentation reflect that there is no vs/master anymore git#3220 from dscho/there-is-no-vs/master-anymore
205: 8ad3782 = 204: 81c9d80 Merge pull request http: Add support for enabling automatic sending of SSL client certificate git#3293 from pascalmuller/http-support-automatically-sending-client-certificate
206: eb0724e = 205: 4de5471 Merge pull request Add
contrib/subtreetest execution to CI builds git#3349 from vdye/feature/ci-subtree-tests207: abf9c01 = 206: 46d810e Merge pull request Make Git for Windows start builds in modern Visual Studio git#3306 from PhilipOakley/vs-sln
208: da91faa = 207: 2b3d05f Merge pull request Begin
unsigned long->size_tconversion to support large files on Windows git#3533 from PhilipOakley/hashliteral_t209: a2d5237 = 208: 339b7b9 Merge pull request Various fixes around
safe.directorygit#3791: Various fixes aroundsafe.directory210: 0d4fc86 = 209: 69a3af8 Merge pull request mingw: set $env:TERM=xterm-256color for newer OSes git#3751 from rkitover/native-term
211: b942f91 = 210: 3ca0c17 Merge pull request winansi: check result before using Name for pty git#3875 from 1480c1/wine/detect_msys_tty
212: 293575c = 211: 4d28b8f Merge branch 'optionally-dont-append-atomically-on-windows'
192: 0fa1316 = 212: 76962ce coverity: skip building with Rust, for now
213: 288edad = 213: 6733c69 Merge branch 'fsync-object-files-always'
214: 9557827 = 214: 1d4ff5f Merge pull request MinGW: link as terminal server aware git#3942 from rimrul/mingw-tsaware
215: 69d5353 = 215: 554d97d Fix Windows version resources (Fix Windows version resources git#4092)
216: 5abb91e = 216: 2e6712a Fix global repository field not being cleared (Fix global repository field not being cleared git#4083)
217: 1f1f3e6 = 217: 90d2038 Skip linking the "dashed"
git-<command>s for built-ins (Skip linking the "dashed"git-<command>s for built-ins git#4252)218: 93ed5c8 = 218: ee4f0f8 Add full
mingw-w64-git(i.e. regular MSYS2 ecosystem) support (Add fullmingw-w64-git(i.e. regular MSYS2 ecosystem) support git#5971)219: a7ff11e = 219: 266fc3c Merge pull request Allow running Git directly from
C:\Program Files\Git\mingw64\bin\git.exegit#2506 from dscho/issue-2283220:
Truncated; see the full conflict report in the workflow run summary.