summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-12-04scalar: implement 'scalar list'Libravatar Derrick Stolee2-1/+21
The produced list simply consists of those repositories registered under the multi-valued `scalar.repo` config setting in the user's Git config. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04scalar: let 'unregister' handle a deleted enlistment directory gracefullyLibravatar Johannes Schindelin2-0/+61
When a user deleted an enlistment manually, let's be generous and _still_ unregister it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04scalar: 'unregister' stops background maintenanceLibravatar Derrick Stolee2-8/+50
Just like `scalar register` starts the scheduled background maintenance, `scalar unregister` stops it. Note that we use `git maintenance start` in `scalar register`, but we do not use `git maintenance stop` in `scalar unregister`: this would stop maintenance for _all_ repositories, not just for the one we want to unregister. The `unregister` command also removes the corresponding entry from the `[scalar]` section in the global Git config. Co-authored-by: Victoria Dye <vdye@github.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04scalar: 'register' sets recommended config and starts maintenanceLibravatar Derrick Stolee2-1/+266
Let's start implementing the `register` command. With this commit, recommended settings are configured upon `scalar register`, and Git's background maintenance is started. The recommended config settings may very well change in the future. For example, once the built-in FSMonitor is available, we will want to enable it upon `scalar register`. For that reason, we explicitly support running `scalar register` in an already-registered enlistment. Co-authored-by: Victoria Dye <vdye@github.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04scalar: create test infrastructureLibravatar Johannes Schindelin3-3/+109
To test the Scalar command, create a test script in contrib/scalar/t that is executed as `make -C contrib/scalar test`. Since Scalar has no meaningful capabilities yet, the only test is rather simple. We will add more tests in subsequent commits that introduce corresponding, new functionality. Note: This test script is intended to test `scalar` only lightly, even after all of the functionality is implemented. A more comprehensive functional (or: integration) test suite can be found at https://github.com/microsoft/scalar; It is used in the workflow https://github.com/microsoft/git/blob/HEAD/.github/workflows/scalar-functional-tests.yml in Microsoft's Git fork. This test suite performs end-to-end tests with a real remote repository, and is run as part of the regular CI and PR builds in that fork. Since those tests require some functionality supported only by Microsoft's Git fork ("GVFS protocol"), there is no intention to port that fuller test suite to `contrib/scalar/`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04scalar: start documenting the commandLibravatar Johannes Schindelin1-0/+38
Let's build up the documentation for the Scalar command along with the patches that implement its functionality. Note: To discourage the feature-incomplete documentation from being mistaken for the complete thing, we do not yet provide any way to build HTML or manual pages from the text file. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04scalar: create a rudimentary executableLibravatar Johannes Schindelin4-0/+81
The idea of Scalar (https://github.com/microsoft/scalar), and before that, of VFS for Git, has always been to prove that Git _can_ scale, and to upstream whatever strategies have been demonstrated to help. With this patch, we start the journey from that C# project to move what is left to Git's own `contrib/` directory, reimplementing it in pure C, with the intention to facilitate integrating the functionality into core Git all while maintaining backwards-compatibility for existing Scalar users (which will be much easier when both live in the same worktree). It has always been the plan to contribute all of the proven strategies back to core Git. For example, while the virtual filesystem provided by VFS for Git helped the team developing the Windows operating system to move onto Git, while trying to upstream it we realized that it cannot be done: getting the virtual filesystem to work (which we only managed to implement fully on Windows, but not on, say, macOS or Linux), and the required server-side support for the GVFS protocol, made this not quite feasible. The Scalar project learned from that and tackled the problem with different tactics: instead of pretending to Git that the working directory is fully populated, it _specifically_ teaches Git about partial clone (which is based on VFS for Git's cache server), about sparse checkout (which VFS for Git tried to do transparently, in the file system layer), and regularly runs maintenance tasks to keep the repository in a healthy state. With partial clone, sparse checkout and `git maintenance` having been upstreamed, there is little left that `scalar.exe` does which `git.exe` cannot do. One such thing is that `scalar clone <url>` will automatically set up a partial, sparse clone, and configure known-helpful settings from the start. So let's bring this convenience into Git's tree. The idea here is that you can (optionally) build Scalar via make -C contrib/scalar/ This will build the `scalar` executable and put it into the contrib/scalar/ subdirectory. The slightly awkward addition of the `contrib/scalar/*` bits to the top-level `Makefile` are actually really required: we want to link to `libgit.a`, which means that we will need to use the very same `CFLAGS` and `LDFLAGS` as the rest of Git. An early development version of this patch tried to replicate all the conditional code in `contrib/scalar/Makefile` (e.g. `NO_POLL`) just like `contrib/svn-fe/Makefile` used to do before it was retired. It turned out to be quite the whack-a-mole game: the SHA-1-related flags, the flags enabling/disabling `compat/poll/`, `compat/regex/`, `compat/win32mmap.c` & friends depending on the current platform... To put it mildly: it was a major mess. Instead, this patch makes minimal changes to the top-level `Makefile` so that the bits in `contrib/scalar/` can be compiled and linked, and adds a `contrib/scalar/Makefile` that uses the top-level `Makefile` in a most minimal way to do the actual compiling. Note: With this commit, we only establish the infrastructure, no Scalar functionality is implemented yet; We will do that incrementally over the next few commits. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04scalar: add a README with a roadmapLibravatar Johannes Schindelin1-0/+82
The Scalar command will be contributed incrementally, over a bunch of patch series. Let's document what Scalar is about, and then describe the patch series that are planned. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-29The first batch to start the current cycleLibravatar Junio C Hamano1-4/+35
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-29Merge branch 'mc/clean-smudge-with-llp64'Libravatar Junio C Hamano11-19/+89
The clean/smudge conversion code path has been prepared to better work on platforms where ulong is narrower than size_t. * mc/clean-smudge-with-llp64: clean/smudge: allow clean filters to process extremely large files odb: guard against data loss checking out a huge file git-compat-util: introduce more size_t helpers odb: teach read_blob_entry to use size_t t1051: introduce a smudge filter test for extremely large files test-lib: add prerequisite for 64-bit platforms test-tool genzeros: generate large amounts of data more efficiently test-genzeros: allow more than 2G zeros in Windows
2021-11-29Merge branch 'ab/sh-retire-helper-functions'Libravatar Junio C Hamano7-41/+14
Make a few helper functions unused and then lose them. * ab/sh-retire-helper-functions: git-sh-setup: remove "sane_grep", it's not needed anymore git-sh-setup: remove unused sane_egrep() function git-instaweb: unconditionally assume that gitweb is mod_perl capable Makefile: remove $(NO_CURL) from $(SCRIPT_DEFINES) Makefile: remove $(GIT_VERSION) from $(SCRIPT_DEFINES) Makefile: move git-SCRIPT-DEFINES adjacent to $(SCRIPT_DEFINES)
2021-11-29Merge branch 'tb/plug-pack-bitmap-leaks'Libravatar Junio C Hamano8-45/+84
Leakfix. * tb/plug-pack-bitmap-leaks: pack-bitmap.c: more aggressively free in free_bitmap_index() pack-bitmap.c: don't leak type-level bitmaps midx.c: write MIDX filenames to strbuf builtin/multi-pack-index.c: don't leak concatenated options builtin/repack.c: avoid leaking child arguments builtin/pack-objects.c: don't leak memory via arguments t/helper/test-read-midx.c: free MIDX within read_midx_file() midx.c: don't leak MIDX from verify_midx_file midx.c: clean up chunkfile after reading the MIDX
2021-11-29Merge branch 'tp/send-email-completion'Libravatar Junio C Hamano4-22/+54
The command line complation for "git send-email" options have been tweaked to make it easier to keep it in sync with the command itself. * tp/send-email-completion: send-email docs: add format-patch options send-email: programmatically generate bash completions
2021-11-29Merge branch 'jc/unsetenv-returns-an-int'Libravatar Junio C Hamano2-2/+4
The compatibility implementation for unsetenv(3) were written to mimic ancient, non-POSIX, variant seen in an old glibc; it has been changed to return an integer to match the more modern era. * jc/unsetenv-returns-an-int: unsetenv(3) returns int, not void
2021-11-29Merge branch 'jc/fix-ref-sorting-parse'Libravatar Junio C Hamano8-52/+95
Things like "git -c branch.sort=bogus branch new HEAD", i.e. the operation modes of the "git branch" command that do not need the sort key information, no longer errors out by seeing a bogus sort key. * jc/fix-ref-sorting-parse: for-each-ref: delay parsing of --sort=<atom> options
2021-11-29Merge branch 'so/stash-staged'Libravatar Junio C Hamano3-12/+113
"git stash" learned the "--staged" option to stash away what has been added to the index (and nothing else). * so/stash-staged: stash: get rid of unused argument in stash_staged() stash: implement '--staged' option for 'push' and 'save'
2021-11-29Merge branch 'jc/tutorial-format-patch-base'Libravatar Junio C Hamano1-13/+28
Teach and encourage first-time contributors to this project to state the base commit when they submit their topic. * jc/tutorial-format-patch-base: MyFirstContribution: teach to use "format-patch --base=auto"
2021-11-29Merge branch 'ab/refs-errno-cleanup'Libravatar Junio C Hamano10-143/+294
The "remainder" of hn/refs-errno-cleanup topic. * ab/refs-errno-cleanup: (21 commits) refs API: post-migration API renaming [2/2] refs API: post-migration API renaming [1/2] refs API: don't expose "errno" in run_transaction_hook() refs API: make expand_ref() & repo_dwim_log() not set errno refs API: make resolve_ref_unsafe() not set errno refs API: make refs_ref_exists() not set errno refs API: make refs_resolve_refdup() not set errno refs tests: ignore ignore errno in test-ref-store helper refs API: ignore errno in worktree.c's find_shared_symref() refs API: ignore errno in worktree.c's add_head_info() refs API: make files_copy_or_rename_ref() et al not set errno refs API: make loose_fill_ref_dir() not set errno refs API: make resolve_gitlink_ref() not set errno refs API: remove refs_read_ref_full() wrapper refs/files: remove "name exist?" check in lock_ref_oid_basic() reflog tests: add --updateref tests refs API: make refs_rename_ref_available() static refs API: make parse_loose_ref_contents() not set errno refs API: make refs_read_raw_ref() not set errno refs API: add a version of refs_resolve_ref_unsafe() with "errno" ...
2021-11-29Merge branch 'ow/stash-count-in-status-porcelain-output'Libravatar Junio C Hamano3-2/+46
Allow "git status --porcelain=v2" to show the number of stash entries with --show-stash like the normal output does. * ow/stash-count-in-status-porcelain-output: status: print stash info with --porcelain=v2 --show-stash status: count stash entries in separate function
2021-11-29Merge branch 'jk/loosen-urlmatch'Libravatar Junio C Hamano2-2/+2
Treat "_" as any other URL-valid characters in an URL when matching the per-URL configuration variable names. * jk/loosen-urlmatch: urlmatch: add underscore to URL_HOST_CHARS
2021-11-24Sync with 2.34.1Libravatar Junio C Hamano1-0/+23
2021-11-24Git 2.34.1Libravatar Junio C Hamano3-2/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-23Merge branch 'jc/save-restore-terminal-revert' into maintLibravatar Junio C Hamano1-8/+0
Regression fix for 2.34 * jc/save-restore-terminal-revert: Revert "editor: save and reset terminal after calling EDITOR"
2021-11-23Merge branch 'ds/add-rm-with-sparse-index' into maintLibravatar Junio C Hamano2-49/+22
Regression fix for 2.34 * ds/add-rm-with-sparse-index: dir: revert "dir: select directories correctly"
2021-11-23Merge branch 'ab/update-submitting-patches' into maintLibravatar Junio C Hamano1-2/+2
Doc fix. * ab/update-submitting-patches: SubmittingPatches: fix Asciidoc syntax in "GitHub CI" section
2021-11-23Merge branch 'ev/pull-already-up-to-date-is-noop' into maintLibravatar Junio C Hamano2-2/+10
"git pull" with any strategy when the other side is behind us should succeed as it is a no-op, but doesn't. * ev/pull-already-up-to-date-is-noop: pull: should be noop when already-up-to-date
2021-11-23Merge branch 'hm/paint-hits-in-log-grep' into maintLibravatar Junio C Hamano2-52/+2
"git grep" looking in a blob that has non-UTF8 payload was completely broken when linked with versions of PCREv2 library older than 10.34 in the latest release. * hm/paint-hits-in-log-grep: Revert "grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data"
2021-11-22A bit more regression fixesLibravatar Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-22Merge branch 'jc/save-restore-terminal-revert'Libravatar Junio C Hamano1-8/+0
Regression fix for 2.34 * jc/save-restore-terminal-revert: Revert "editor: save and reset terminal after calling EDITOR"
2021-11-22Merge branch 'ds/add-rm-with-sparse-index'Libravatar Junio C Hamano2-49/+22
Regression fix for 2.34 * ds/add-rm-with-sparse-index: dir: revert "dir: select directories correctly"
2021-11-22Revert "editor: save and reset terminal after calling EDITOR"Libravatar Junio C Hamano1-8/+0
This reverts commit 3d411afabc9a96f41d47c07d6af6edda3d29ec92, blindly opening /dev/tty and calling tcsetattr() seems to be causing problems. cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=577358 cf. https://lore.kernel.org/git/04ab7301-ea34-476c-eae4-4044fef74b91@gmail.com/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-22dir: revert "dir: select directories correctly"Libravatar Derrick Stolee2-49/+22
This reverts commit f6526728f950cacfd5b5e42bcc65f2c47f3da654. The change in f652672 (dir: select directories correctly, 2021-09-24) caused a regression in directory-based matches with non-cone-mode patterns, especially for .gitignore patterns. A test is included to prevent this regression in the future. The commit ed495847 (dir: fix pattern matching on dirs, 2021-09-24) was reverted in 5ceb663 (dir: fix directory-matching bug, 2021-11-02) for similar reasons. Neither commit changed tests, and tests added later in the series continue to pass when these commits are reverted. Reported-by: Danial Alihosseini <danial.alihosseini@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-210th batch for early fixesLibravatar Junio C Hamano3-2/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-21Merge branch 'ab/update-submitting-patches'Libravatar Junio C Hamano1-2/+2
Doc fix. * ab/update-submitting-patches: SubmittingPatches: fix Asciidoc syntax in "GitHub CI" section
2021-11-21Merge branch 'ev/pull-already-up-to-date-is-noop'Libravatar Junio C Hamano2-2/+10
"git pull" with any strategy when the other side is behind us should succeed as it is a no-op, but doesn't. * ev/pull-already-up-to-date-is-noop: pull: should be noop when already-up-to-date
2021-11-21Merge branch 'hm/paint-hits-in-log-grep'Libravatar Junio C Hamano2-52/+2
"git grep" looking in a blob that has non-UTF8 payload was completely broken when linked with certain versions of PCREv2 library in the latest release. * hm/paint-hits-in-log-grep: Revert "grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data"
2021-11-19Revert "grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data"Libravatar Junio C Hamano2-52/+2
This reverts commit ae39ba431ab861548eb60b4bd2e1d8b8813db76f, as it breaks "grep" when looking for a string in non UTF-8 haystack, when linked with certain versions of PCREv2 library. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-18pull: should be noop when already-up-to-dateLibravatar Erwin Villejo2-2/+10
The already-up-to-date pull bug was fixed for --ff-only but it did not include the case where --ff or --ff-only are not specified. This updates the --ff-only fix to include the case where --ff or --ff-only are not specified in command line flags or config. Signed-off-by: Erwin Villejo <erwin.villejo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-14Git 2.34Libravatar Junio C Hamano2-5/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-14Merge tag 'l10n-2.34.0-rnd3.1' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano17-61128/+63643
l10n-2.34.0-rnd3.1 * tag 'l10n-2.34.0-rnd3.1' of git://github.com/git-l10n/git-po: (38 commits) l10n: pl: 2.34.0 round 3 l10n: it: fix typos found by git-po-helper l10n: ko: fix typos found by git-po-helper l10n: Update Catalan translation l10n: po-id for 2.34 (round 3) l10n: bg.po: Updated Bulgarian translation (5211t) l10n: de.po: Update German translation for Git v2.34.0 l10n: sv.po: Update Swedish translation (5211t0f0) l10n: vi(5211t): Translation for v2.34.0 rd3 l10n: zh_TW.po: v2.34.0 round 3 (0 untranslated) l10n: fr: v2.34.0 rnd 3 l10n: tr: v2.34.0 round 3 l10n: zh_CN: v2.34.0 round 3 l10n: git.pot: v2.34.0 round 3 (1 new) l10n: pl: 2.34.0 round 2 l10n: vi(5210t): Translation for v2.34.0 rd2 l10n: es: 2.34.0 round 2 l10n: Update Catalan translation l10n: bg.po: Updated Bulgarian translation (5210t) l10n: fr: v2.34.0 round 2 ...
2021-11-14l10n: pl: 2.34.0 round 3Libravatar Arusekk1-92/+96
Signed-off-by: Arusekk <arek_koz@o2.pl>
2021-11-14l10n: it: fix typos found by git-po-helperLibravatar Jiang Xin1-3/+3
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2021-11-13SubmittingPatches: fix Asciidoc syntax in "GitHub CI" sectionLibravatar Philippe Blain1-2/+2
A superfluous ']' was added to the title of the GitHub CI section in f003a91f5c (SubmittingPatches: replace discussion of Travis with GitHub Actions, 2021-07-22). Remove it. While at it, format the URL for a GitHub user's workflow runs of Git between backticks, since if not Asciidoc formats only the first part, "https://github.com/<Your", as a link, which is not very useful. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-14l10n: ko: fix typos found by git-po-helperLibravatar Jiang Xin1-5/+5
When checking typos in file "po/ko.po", "git-po-helper" reports lots of false positives because there are no spaces between ASCII and Korean characters. After applied commit adee197 "(dict: add smudge table for Korean language, 2021-11-11)" of "git-l10n/git-po-helper" to suppress these false positives, some easy-to-fix typos are found and fixed. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2021-11-13l10n: Update Catalan translationLibravatar Jordi Mas1-52/+41
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2021-11-13Merge branch 'po-id' of github.com:bagasme/git-poLibravatar Jiang Xin1-307/+196
* 'po-id' of github.com:bagasme/git-po: l10n: po-id for 2.34 (round 3)
2021-11-13l10n: po-id for 2.34 (round 3)Libravatar Bagas Sanjaya1-307/+196
- Translate following new components: * merge.c * rebase-interactive.c * rebase.c * midx.c - Clean up obsolete translations Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2021-11-13Merge branch 'master' of github.com:ruester/git-po-deLibravatar Jiang Xin1-4264/+4119
* 'master' of github.com:ruester/git-po-de: l10n: de.po: Update German translation for Git v2.34.0
2021-11-12Merge branch 'js/trace2-raise-format-version'Libravatar Junio C Hamano2-3/+3
When we added a new event type to trace2 event stream, we forgot to raise the format version number, which has been corrected. * js/trace2-raise-format-version: trace2: increment event format version
2021-11-12Merge branch 'ab/fsck-unexpected-type'Libravatar Junio C Hamano3-4/+12
Regression fix. * ab/fsck-unexpected-type: object-file: free(*contents) only in read_loose_object() caller object-file: fix SEGV on free() regression in v2.34.0-rc2