Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
4bc0ba0
pack-objects: extract should_attempt_deltas()
derrickstolee May 16, 2025
70664d2
pack-objects: add --path-walk option
derrickstolee May 16, 2025
9fcfe12
pack-objects: update usage to match docs
derrickstolee May 16, 2025
3ce9e5f
p5313: add performance tests for --path-walk
derrickstolee May 16, 2025
861d4bc
pack-objects: introduce GIT_TEST_PACK_PATH_WALK
derrickstolee May 16, 2025
6e95bf8
t5538: add tests to confirm deltas in shallow pushes
derrickstolee May 16, 2025
5f71150
repack: add --path-walk option
derrickstolee May 16, 2025
4f7f571
pack-objects: enable --path-walk via config
derrickstolee May 16, 2025
4933152
scalar: enable path-walk during push via config
derrickstolee May 16, 2025
206a1bb
pack-objects: refactor path-walk delta phase
derrickstolee May 16, 2025
e539479
pack-objects: thread the path-based compression
derrickstolee May 16, 2025
4705889
path-walk: add new 'edge_aggressive' option
derrickstolee May 16, 2025
c178b02
pack-objects: allow --shallow and --path-walk
derrickstolee May 16, 2025
6e4fb00
pathspec: add match_leading_pathspec variant
jacob-keller May 21, 2025
00466c1
pathspec: add flag to indicate operation without repository
jacob-keller May 21, 2025
09fb155
diff --no-index: support limiting by pathspec
jacob-keller May 21, 2025
1d9526d
userdiff: add support for R programming language
rodrigorsdc May 29, 2025
200d747
docs: add credential helper for yahoo and link Google's sendgmail tool
AdityaGarg8 May 30, 2025
394c190
docs: improve formatting in git-send-email documentation
AdityaGarg8 May 30, 2025
6cae42c
docs: remove credential helper links for emails from gitcredentials
AdityaGarg8 May 30, 2025
9e68aab
docs: make the purpose of using app password for Gmail more clear in …
AdityaGarg8 May 30, 2025
faac9d4
t: stop announcing prereqs
pks-t Jun 2, 2025
ddfcb9d
t: silence output from `test_create_repo()`
pks-t Jun 2, 2025
8445370
t9822: use prereq to check for ISO-8859-1 support
pks-t Jun 2, 2025
a1199a2
t983*: use prereq to check for Python-specific git-p4(1) support
pks-t Jun 2, 2025
d411d3d
t/test-lib: don't print shell traces to stdout
pks-t Jun 2, 2025
d4ea24b
t/test-lib: fix TAP format for BASH_XTRACEFD warning
pks-t Jun 2, 2025
d3d8c60
t7815: fix unexpectedly passing test on macOS
pks-t Jun 2, 2025
5e0752b
test-lib: fail on unexpectedly passing tests
pks-t Jun 2, 2025
b44e63f
meson: introduce kwargs variable for tests
pks-t Jun 2, 2025
c1bc974
meson: parse TAP output generated by our tests
pks-t Jun 2, 2025
08c3aaf
MyFirstContribution: use struct repository in examples
lucasoshiro Jun 2, 2025
b257adb
MyFirstContribution: add walken.c to meson.build
lucasoshiro Jun 2, 2025
8b34b6a
sequencer: replace error() with BUG() in update_squash_messages ()
brandb97 Jun 3, 2025
5dceb8b
BUG(): remove leading underscore of the format string
brandb97 Jun 3, 2025
9fd3803
t1006: update 'run_tests' to test generic object specifiers
vdye Jun 2, 2025
aba1438
cat-file: add %(objectmode) atom
vdye Jun 2, 2025
b0b910e
cat-file.c: add batch handling for submodules
vdye Jun 2, 2025
aedebdb
builtin/fetch-pack: cleanup before return error
brandb97 Jun 4, 2025
7082da8
commit-graph: fix start_delayed_progress() leak
brandb97 Jun 4, 2025
60f9bc3
Merge branch 'lo/my-first-ow-doc-update'
gitster Jun 17, 2025
88134a8
Merge branch 'ds/path-walk-2'
gitster Jun 17, 2025
01148ca
Merge branch 'rc/userdiff-r'
gitster Jun 17, 2025
5b124e7
Merge branch 'ag/send-email-docs'
gitster Jun 17, 2025
4fd5b1d
Merge branch 'vd/cat-file-objectmode-update'
gitster Jun 17, 2025
870a042
Merge branch 'ly/sequencer-update-squash-is-fixup-only'
gitster Jun 17, 2025
1f622bb
Merge branch 'ly/do-not-localize-bug-messages'
gitster Jun 17, 2025
b5a135b
Merge branch 'ly/commit-graph-graph-write-leakfix'
gitster Jun 17, 2025
5e22d03
Merge branch 'ly/fetch-pack-leakfix'
gitster Jun 17, 2025
2024ab3
Merge branch 'jk/diff-no-index-with-pathspec'
gitster Jun 17, 2025
b1dc2e7
Merge branch 'ps/meson-tap-parse'
gitster Jun 17, 2025
f9aa0ee
Start 2.51 cycle, the first batch
gitster Jun 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions Documentation/MyFirstObjectWalk.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:
#include "builtin.h"
#include "trace.h"

int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
trace_printf(_("cmd_walken incoming...\n"));
return 0;
Expand Down Expand Up @@ -86,7 +86,7 @@ int cmd_walken(int argc, const char **argv, const char *prefix)
Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:

----
int cmd_walken(int argc, const char **argv, const char *prefix);
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);
----

Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,
Expand All @@ -96,10 +96,23 @@ maintaining alphabetical ordering:
{ "walken", cmd_walken, RUN_SETUP },
----

Add it to the `Makefile` near the line for `builtin/worktree.o`:
Add an entry for the new command in the both the Make and Meson build system,
before the entry for `worktree`:

- In the `Makefile`:
----
...
BUILTIN_OBJS += builtin/walken.o
...
----

- In the `meson.build` file:
----
builtin_sources = [
...
'builtin/walken.c',
...
]
----

Build and test out your command, without forgetting to ensure the `DEVELOPER`
Expand Down Expand Up @@ -193,7 +206,7 @@ initialization functions.

Next, we should have a look at any relevant configuration settings (i.e.,
settings readable and settable from `git config`). This is done by providing a
callback to `git_config()`; within that callback, you can also invoke methods
callback to `repo_config()`; within that callback, you can also invoke methods
from other components you may need that need to intercept these options. Your
callback will be invoked once per each configuration value which Git knows about
(global, local, worktree, etc.).
Expand Down Expand Up @@ -221,14 +234,14 @@ static int git_walken_config(const char *var, const char *value,
}
----

Make sure to invoke `git_config()` with it in your `cmd_walken()`:
Make sure to invoke `repo_config()` with it in your `cmd_walken()`:

----
int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
...

git_config(git_walken_config, NULL);
repo_config(repo, git_walken_config, NULL);

...
}
Expand All @@ -250,14 +263,14 @@ We'll also need to include the `revision.h` header:

...

int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
/* This can go wherever you like in your declarations.*/
struct rev_info rev;
...

/* This should go after the git_config() call. */
repo_init_revisions(the_repository, &rev, prefix);
/* This should go after the repo_config() call. */
repo_init_revisions(repo, &rev, prefix);

...
}
Expand Down Expand Up @@ -305,7 +318,7 @@ Then let's invoke `final_rev_info_setup()` after the call to
`repo_init_revisions()`:

----
int cmd_walken(int argc, const char **argv, const char *prefix)
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
{
...

Expand Down
45 changes: 45 additions & 0 deletions Documentation/RelNotes/2.51.0.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Git v2.51 Release Notes
=======================

UI, Workflows & Features
------------------------

* Userdiff patterns for the R language have been added.

* Documentation for "git send-email" has been updated with a bit more
credential helper and OAuth information.

* "git cat-file --batch" learns to understand %(objectmode) atom to
allow the caller to tell missing objects (due to repository
corruption) and submodules (whose commit objects are OK to be
missing) apart.

* "git diff --no-index dirA dirB" can limit the comparison with
pathspec at the end of the command line, just like normal "git
diff".


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------

* "git pack-objects" learned to find delta bases from blobs at the
same path, using the --path-walk API.


Fixes since v2.50
-----------------

* A memory-leak in an error code path has been plugged.
(merge 7082da85cb ly/commit-graph-graph-write-leakfix later to maint).

* A memory-leak in an error code path has been plugged.
(merge aedebdb6b9 ly/fetch-pack-leakfix later to maint).

* Meson-based build/test framework now understands TAP output
generated by our tests.
(merge c1bc974923 ps/meson-tap-parse later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge b257adb571 lo/my-first-ow-doc-update later to maint).
(merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
(merge 5dceb8bd05 ly/do-not-localize-bug-messages later to maint).
4 changes: 4 additions & 0 deletions Documentation/config/feature.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ walking fewer objects.
+
* `pack.allowPackReuse=multi` may improve the time it takes to create a pack by
reusing objects from multiple packs instead of just one.
+
* `pack.usePathWalk` may speed up packfile creation and make the packfiles be
significantly smaller in the presence of certain filename collisions with Git's
default name-hash.

feature.manyFiles::
Enable config options that optimize for repos with many files in the
Expand Down
4 changes: 4 additions & 0 deletions Documentation/config/pack.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ pack.useSparse::
commits contain certain types of direct renames. Default is
`true`.

pack.usePathWalk::
Enable the `--path-walk` option by default for `git pack-objects`
processes. See linkgit:git-pack-objects[1] for full details.

pack.preferBitmapTips::
When selecting which commits will receive bitmaps, prefer a
commit at the tip of any reference that is a suffix of any value
Expand Down
20 changes: 10 additions & 10 deletions Documentation/config/sendemail.adoc
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
sendemail.identity::
A configuration identity. When given, causes values in the
'sendemail.<identity>' subsection to take precedence over
values in the 'sendemail' section. The default identity is
`sendemail.<identity>` subsection to take precedence over
values in the `sendemail` section. The default identity is
the value of `sendemail.identity`.

sendemail.smtpEncryption::
See linkgit:git-send-email[1] for description. Note that this
setting is not subject to the 'identity' mechanism.
setting is not subject to the `identity` mechanism.

sendemail.smtpSSLCertPath::
Path to ca-certificates (either a directory or a single file).
Set it to an empty string to disable certificate verification.

sendemail.<identity>.*::
Identity-specific versions of the 'sendemail.*' parameters
Identity-specific versions of the `sendemail.*` parameters
found below, taking precedence over those when this
identity is selected, through either the command-line or
`sendemail.identity`.

sendemail.multiEdit::
If true (default), a single editor instance will be spawned to edit
If `true` (default), a single editor instance will be spawned to edit
files you have to edit (patches when `--annotate` is used, and the
summary when `--compose` is used). If false, files will be edited one
summary when `--compose` is used). If `false`, files will be edited one
after the other, spawning a new editor each time.

sendemail.confirm::
Sets the default for whether to confirm before sending. Must be
one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm`
one of `always`, `never`, `cc`, `compose`, or `auto`. See `--confirm`
in the linkgit:git-send-email[1] documentation for the meaning of these
values.

Expand All @@ -51,7 +51,7 @@ sendemail.aliasesFile::

sendemail.aliasFileType::
Format of the file(s) specified in sendemail.aliasesFile. Must be
one of 'mutt', 'mailrc', 'pine', 'elm', 'gnus', or 'sendmail'.
one of `mutt`, `mailrc`, `pine`, `elm`, `gnus`, or `sendmail`.
+
What an alias file in each format looks like can be found in
the documentation of the email program of the same name. The
Expand Down Expand Up @@ -101,7 +101,7 @@ sendemail.signedOffCc (deprecated)::

sendemail.smtpBatchSize::
Number of messages to be sent per connection, after that a relogin
will happen. If the value is 0 or undefined, send all messages in
will happen. If the value is `0` or undefined, send all messages in
one connection.
See also the `--batch-size` option of linkgit:git-send-email[1].

Expand All @@ -111,5 +111,5 @@ sendemail.smtpReloginDelay::

sendemail.forbidSendmailVariables::
To avoid common misconfiguration mistakes, linkgit:git-send-email[1]
will abort with a warning if any configuration options for "sendmail"
will abort with a warning if any configuration options for `sendmail`
exist. Set this variable to bypass the check.
13 changes: 13 additions & 0 deletions Documentation/git-cat-file.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ newline. The available atoms are:
`objecttype`::
The type of the object (the same as `cat-file -t` reports).

`objectmode`::
If the specified object has mode information (such as a tree or
index entry), the mode expressed as an octal integer. Otherwise,
empty string.

`objectsize`::
The size, in bytes, of the object (the same as `cat-file -s`
reports).
Expand Down Expand Up @@ -368,6 +373,14 @@ If a name is specified that might refer to more than one object (an ambiguous sh
<object> SP ambiguous LF
------------

If a name is specified that refers to a submodule entry in a tree and the
target object does not exist in the repository, then `cat-file` will ignore
any custom format and print (with the object ID of the submodule):

------------
<oid> SP submodule LF
------------

If `--follow-symlinks` is used, and a symlink in the repository points
outside the repository, then `cat-file` will ignore any custom format
and print:
Expand Down
10 changes: 7 additions & 3 deletions Documentation/git-diff.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]
git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]
git diff [<options>] <commit>...<commit> [--] [<path>...]
git diff [<options>] <blob> <blob>
git diff [<options>] --no-index [--] <path> <path>
git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]

DESCRIPTION
-----------
Expand All @@ -31,14 +31,18 @@ files on disk.
further add to the index but you still haven't. You can
stage these changes by using linkgit:git-add[1].

`git diff [<options>] --no-index [--] <path> <path>`::
`git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]`::

This form is to compare the given two paths on the
filesystem. You can omit the `--no-index` option when
running the command in a working tree controlled by Git and
at least one of the paths points outside the working tree,
or when running the command outside a working tree
controlled by Git. This form implies `--exit-code`.
controlled by Git. This form implies `--exit-code`. If both
paths point to directories, additional pathspecs may be
provided. These will limit the files included in the
difference. All such pathspecs must be relative as they
apply to both sides of the diff.

`git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]`::

Expand Down
25 changes: 18 additions & 7 deletions Documentation/git-pack-objects.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ SYNOPSIS
--------
[verse]
'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied]
[--no-reuse-delta] [--delta-base-offset] [--non-empty]
[--local] [--incremental] [--window=<n>] [--depth=<n>]
[--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
[--cruft] [--cruft-expiration=<time>]
[--stdout [--filter=<filter-spec>] | <base-name>]
[--shallow] [--keep-true-parents] [--[no-]sparse]
[--name-hash-version=<n>] < <object-list>
[--no-reuse-delta] [--delta-base-offset] [--non-empty]
[--local] [--incremental] [--window=<n>] [--depth=<n>]
[--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
[--cruft] [--cruft-expiration=<time>]
[--stdout [--filter=<filter-spec>] | <base-name>]
[--shallow] [--keep-true-parents] [--[no-]sparse]
[--name-hash-version=<n>] [--path-walk] < <object-list>


DESCRIPTION
Expand Down Expand Up @@ -375,6 +375,17 @@ many different directories. At the moment, this version is not allowed
when writing reachability bitmap files with `--write-bitmap-index` and it
will be automatically changed to version `1`.

--path-walk::
Perform compression by first organizing objects by path, then a
second pass that compresses across paths as normal. This has the
potential to improve delta compression especially in the presence
of filenames that cause collisions in Git's default name-hash
algorithm.
+
Incompatible with `--delta-islands`, `--shallow`, or `--filter`. The
`--use-bitmap-index` option will be ignored in the presence of
`--path-walk.`


DELTA ISLANDS
-------------
Expand Down
5 changes: 4 additions & 1 deletion Documentation/git-repack.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SYNOPSIS
[verse]
'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
[--write-midx] [--name-hash-version=<n>]
[--write-midx] [--name-hash-version=<n>] [--path-walk]

DESCRIPTION
-----------
Expand Down Expand Up @@ -258,6 +258,9 @@ linkgit:git-multi-pack-index[1]).
Provide this argument to the underlying `git pack-objects` process.
See linkgit:git-pack-objects[1] for full details.

--path-walk::
Pass the `--path-walk` option to the underlying `git pack-objects`
process. See linkgit:git-pack-objects[1] for full details.

CONFIGURATION
-------------
Expand Down
Loading