Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4a3422b
Merge branch 'jt/de-global-bulk-checkin' into jt/odb-transaction
gitster Sep 9, 2025
197f0d0
meson: introduce a "docs" alias to compile documentation only
pks-t Sep 11, 2025
b64579d
meson: print docs backend as part of the summary
pks-t Sep 11, 2025
ff4ec8d
ci: don't compile whole project when testing docs with Meson
pks-t Sep 11, 2025
f3c1db4
bulk-checkin: remove ODB transaction nesting
jltobler Sep 16, 2025
9c61d9a
builtin/update-index: end ODB transaction when --verbose is specified
jltobler Sep 16, 2025
ca7d934
bulk-checkin: drop flush_odb_transaction()
jltobler Sep 16, 2025
78839e9
object-file: relocate ODB transaction code
jltobler Sep 16, 2025
ed0f5f9
object-file: update naming from bulk-checkin
jltobler Sep 16, 2025
ce1661f
odb: add transaction interface
jltobler Sep 16, 2025
2f8fd20
gpg-interface: refactor 'enum sign_mode' parsing
chriscool Sep 17, 2025
eaaddf5
fast-import: add '--signed-commits=<mode>' option
chriscool Sep 17, 2025
29fe658
Makefile: don’t add whatchanged after it has been removed
LemmingAvalanche Sep 17, 2025
5f31632
git: add `deprecated` category to --list-cmds
LemmingAvalanche Sep 17, 2025
b4f9282
git: move seen-alias bookkeeping into handle_alias(...)
LemmingAvalanche Sep 17, 2025
bf68b11
git: allow alias-shadowing deprecated builtins
LemmingAvalanche Sep 17, 2025
65d33db
t0014: test shadowing of aliases for a sample of builtins
LemmingAvalanche Sep 17, 2025
098230f
you-still-use-that??: help the user help themselves
LemmingAvalanche Sep 17, 2025
5a31252
whatchanged: hint about git-log(1) and aliasing
LemmingAvalanche Sep 17, 2025
a9235f6
whatchanged: remove not-even-shorter clause
LemmingAvalanche Sep 17, 2025
54a60e5
BreakingChanges: remove claim about whatchanged reports
LemmingAvalanche Sep 17, 2025
8dfe077
refs: add a generic 'optimize' API
inosmeet Sep 19, 2025
1fd6067
files-backend: implement 'optimize' action
inosmeet Sep 19, 2025
da0849a
reftable-backend: implement 'optimize' action
inosmeet Sep 19, 2025
0bef413
builtin/pack-refs: convert to use the generic refs_optimize() API
inosmeet Sep 19, 2025
0d4ec33
builtin/pack-refs: factor out core logic into a shared library
inosmeet Sep 19, 2025
93efe34
doc: pack-refs: factor out common options
inosmeet Sep 19, 2025
ecc70a4
builtin/refs: add optimize subcommand
inosmeet Sep 19, 2025
ac0bad0
t0601: refactor tests to be shareable
inosmeet Sep 19, 2025
c44afd6
t: add test for git refs optimize subcommand
inosmeet Sep 19, 2025
f1371a3
t1300: write test expectations in the test's body
pks-t Sep 22, 2025
7f89ad8
t1300: small style fixups
pks-t Sep 22, 2025
6e6ed3e
builtin/config: do not die in `get_color()`
pks-t Sep 22, 2025
54b24b1
builtin/config: special-case retrieving colors without a key
pks-t Sep 22, 2025
e4dabf4
builtin/config: do not spawn pager when printing color codes
pks-t Sep 22, 2025
fd13909
Merge branch 'jt/odb-transaction'
gitster Oct 2, 2025
db0babf
Merge branch 'ms/refs-optimize'
gitster Oct 2, 2025
f2d464b
Merge branch 'cc/fast-import-strip-signed-commits'
gitster Oct 2, 2025
2ddbf14
Merge branch 'ps/config-get-color-fixes'
gitster Oct 2, 2025
2f49ec7
Merge branch 'ps/meson-build-docs'
gitster Oct 2, 2025
7ae9eaf
Merge branch 'kh/you-still-use-whatchanged-fix'
gitster Oct 2, 2025
5099f64
The fourteenth batch
gitster Oct 2, 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
2 changes: 1 addition & 1 deletion Documentation/BreakingChanges.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ These features will be removed.
equivalent `git log --raw`. We have nominated the command for
removal, have changed the command to refuse to work unless the
`--i-still-use-this` option is given, and asked the users to report
when they do so. So far there hasn't been a single complaint.
when they do so.
+
The command will be removed.

Expand Down
21 changes: 21 additions & 0 deletions Documentation/RelNotes/2.52.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ UI, Workflows & Features
* The stash.index configuration variable can be set to make "git stash
pop/apply" pretend that it was invoked with "--index".

* "git fast-import" learned that "--signed-commits=<how>" option that
corresponds to that of "git fast-export".


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -83,6 +86,10 @@ Performance, Internal Implementation, Development Support etc.
singleton variable, which has been updated to pass an instance
throughout the callchain.

* The work to build on the bulk-checkin infrastructure to create many
objects at once in a transaction and to abstract it into the
generic object layer continues.

* CodingGuidelines now spells out how bitfields are to be written.

* Adjust to the way newer versions of cURL selectivel enables tracing
Expand All @@ -102,6 +109,10 @@ Performance, Internal Implementation, Development Support etc.
while the code has been cleaned up to prevent similar bugs in the
future.

* The build procedure based on meson learned a target to only build
documentation, similar to "make doc".
(merge ff4ec8ded0 ps/meson-build-docs later to maint).


Fixes since v2.51
-----------------
Expand Down Expand Up @@ -259,6 +270,16 @@ including security updates, are included in this release.
* "git last-modified" operating in non-recursive mode used to trigger
a BUG(), which has been corrected.

* The use of "git config get" command to learn how ANSI color
sequence is for a particular type, e.g., "git config get
--type=color --default=reset no.such.thing", isn't very ergonomic.
(merge e4dabf4fd6 ps/config-get-color-fixes later to maint).

* The "do you still use it?" message given by a command that is
deeply deprecated and allow us to suggest alternatives has been
updated.
(merge 54a60e5b38 kh/you-still-use-whatchanged-fix later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge 823d537fa7 kh/doc-git-log-markup-fix later to maint).
(merge cf7efa4f33 rj/t6137-cygwin-fix later to maint).
Expand Down
3 changes: 2 additions & 1 deletion Documentation/config/alias.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ alias.*::
after defining `alias.last = cat-file commit HEAD`, the invocation
`git last` is equivalent to `git cat-file commit HEAD`. To avoid
confusion and troubles with script usage, aliases that
hide existing Git commands are ignored. Arguments are split by
hide existing Git commands are ignored except for deprecated
commands. Arguments are split by
spaces, the usual shell quoting and escaping are supported.
A quote pair or a backslash can be used to quote them.
+
Expand Down
5 changes: 5 additions & 0 deletions Documentation/git-fast-import.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ fast-import stream! This option is enabled automatically for
remote-helpers that use the `import` capability, as they are
already trusted to run their own code.

--signed-commits=(verbatim|warn-verbatim|warn-strip|strip|abort)::
Specify how to handle signed commits. Behaves in the same way
as the same option in linkgit:git-fast-export[1], except that
default is 'verbatim' (instead of 'abort').

Options for Frontends
~~~~~~~~~~~~~~~~~~~~~

Expand Down
53 changes: 1 addition & 52 deletions Documentation/git-pack-refs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,58 +45,7 @@ unpacked.
OPTIONS
-------

--all::

The command by default packs all tags and refs that are already
packed, and leaves other refs
alone. This is because branches are expected to be actively
developed and packing their tips does not help performance.
This option causes all refs to be packed as well, with the exception
of hidden refs, broken refs, and symbolic refs. Useful for a repository
with many branches of historical interests.

--no-prune::

The command usually removes loose refs under `$GIT_DIR/refs`
hierarchy after packing them. This option tells it not to.

--auto::

Pack refs as needed depending on the current state of the ref database. The
behavior depends on the ref format used by the repository and may change in the
future.
+
- "files": Loose references are packed into the `packed-refs` file
based on the ratio of loose references to the size of the
`packed-refs` file. The bigger the `packed-refs` file, the more loose
references need to exist before we repack.
+
- "reftable": Tables are compacted such that they form a geometric
sequence. For two tables N and N+1, where N+1 is newer, this
maintains the property that N is at least twice as big as N+1. Only
tables that violate this property are compacted.

--include <pattern>::

Pack refs based on a `glob(7)` pattern. Repetitions of this option
accumulate inclusion patterns. If a ref is both included in `--include` and
`--exclude`, `--exclude` takes precedence. Using `--include` will preclude all
tags from being included by default. Symbolic refs and broken refs will never
be packed. When used with `--all`, it will be a noop. Use `--no-include` to clear
and reset the list of patterns.

--exclude <pattern>::

Do not pack refs matching the given `glob(7)` pattern. Repetitions of this option
accumulate exclusion patterns. Use `--no-exclude` to clear and reset the list of
patterns. If a ref is already packed, including it with `--exclude` will not
unpack it.
+
When used with `--all`, pack only loose refs which do not match any of
the provided `--exclude` patterns.
+
When used with `--include`, refs provided to `--include`, minus refs that are
provided to `--exclude` will be packed.
include::pack-refs-options.adoc[]


BUGS
Expand Down
10 changes: 10 additions & 0 deletions Documentation/git-refs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ git refs list [--count=<count>] [--shell|--perl|--python|--tcl]
[(--exclude=<pattern>)...] [--start-after=<marker>]
[ --stdin | (<pattern>...)]
git refs exists <ref>
git refs optimize [--all] [--no-prune] [--auto] [--include <pattern>] [--exclude <pattern>]

DESCRIPTION
-----------
Expand All @@ -45,6 +46,11 @@ exists::
failed with an error other than the reference being missing. This does
not verify whether the reference resolves to an actual object.

optimize::
Optimizes references to improve repository performance and reduce disk
usage. This subcommand is an alias for linkgit:git-pack-refs[1] and
offers identical functionality.

OPTIONS
-------

Expand Down Expand Up @@ -80,6 +86,10 @@ The following options are specific to 'git refs list':

include::for-each-ref-options.adoc[]

The following options are specific to 'git refs optimize':

include::pack-refs-options.adoc[]

KNOWN LIMITATIONS
-----------------

Expand Down
8 changes: 6 additions & 2 deletions Documentation/git-whatchanged.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WARNING
-------
`git whatchanged` has been deprecated and is scheduled for removal in
a future version of Git, as it is merely `git log` with different
default; `whatchanged` is not even shorter to type than `log --raw`.
defaults.

DESCRIPTION
-----------
Expand All @@ -24,7 +24,11 @@ Shows commit logs and diff output each commit introduces.

New users are encouraged to use linkgit:git-log[1] instead. The
`whatchanged` command is essentially the same as linkgit:git-log[1]
but defaults to showing the raw format diff output and skipping merges.
but defaults to showing the raw format diff output and skipping merges:

----
git log --raw --no-merges
----

The command is primarily kept for historical reasons; fingers of
many people who learned Git long before `git log` was invented by
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ If you just want to run git as if it was started in `<path>` then use
List commands by group. This is an internal/experimental
option and may change or be removed in the future. Supported
groups are: builtins, parseopt (builtin commands that use
parse-options), main (all commands in libexec directory),
parse-options), deprecated (deprecated builtins),
main (all commands in libexec directory),
others (all other commands in `$PATH` that have git- prefix),
list-<category> (see categories in command-list.txt),
nohelpers (exclude helper commands), alias and config
Expand Down
4 changes: 2 additions & 2 deletions Documentation/howto/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ howto_index = custom_target(
output: 'howto-index.adoc',
)

custom_target(
doc_targets += custom_target(
command: asciidoc_html_options,
input: howto_index,
output: 'howto-index.html',
Expand All @@ -51,7 +51,7 @@ foreach howto : howto_sources
capture: true,
)

custom_target(
doc_targets += custom_target(
command: asciidoc_html_options,
input: howto_stripped,
output: fs.stem(howto_stripped.full_path()) + '.html',
Expand Down
8 changes: 4 additions & 4 deletions Documentation/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ foreach manpage, category : manpages
output: fs.stem(manpage) + '.xml',
)

custom_target(
doc_targets += custom_target(
command: [
xmlto,
'-m', '@INPUT0@',
Expand All @@ -400,7 +400,7 @@ foreach manpage, category : manpages
endif

if get_option('docs').contains('html')
custom_target(
doc_targets += custom_target(
command: asciidoc_common_options + [
'--backend=' + asciidoc_html,
'--doctype=manpage',
Expand Down Expand Up @@ -452,7 +452,7 @@ if get_option('docs').contains('html')
depends: documentation_deps,
)

custom_target(
doc_targets += custom_target(
command: [
xsltproc,
'--xinclude',
Expand Down Expand Up @@ -481,7 +481,7 @@ if get_option('docs').contains('html')
]

foreach article : articles
custom_target(
doc_targets += custom_target(
command: asciidoc_common_options + [
'--backend=' + asciidoc_html,
'--out-file=@OUTPUT@',
Expand Down
52 changes: 52 additions & 0 deletions Documentation/pack-refs-options.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
--all::

The command by default packs all tags and refs that are already
packed, and leaves other refs
alone. This is because branches are expected to be actively
developed and packing their tips does not help performance.
This option causes all refs to be packed as well, with the exception
of hidden refs, broken refs, and symbolic refs. Useful for a repository
with many branches of historical interests.

--no-prune::

The command usually removes loose refs under `$GIT_DIR/refs`
hierarchy after packing them. This option tells it not to.

--auto::

Pack refs as needed depending on the current state of the ref database. The
behavior depends on the ref format used by the repository and may change in the
future.
+
- "files": Loose references are packed into the `packed-refs` file
based on the ratio of loose references to the size of the
`packed-refs` file. The bigger the `packed-refs` file, the more loose
references need to exist before we repack.
+
- "reftable": Tables are compacted such that they form a geometric
sequence. For two tables N and N+1, where N+1 is newer, this
maintains the property that N is at least twice as big as N+1. Only
tables that violate this property are compacted.

--include <pattern>::

Pack refs based on a `glob(7)` pattern. Repetitions of this option
accumulate inclusion patterns. If a ref is both included in `--include` and
`--exclude`, `--exclude` takes precedence. Using `--include` will preclude all
tags from being included by default. Symbolic refs and broken refs will never
be packed. When used with `--all`, it will be a noop. Use `--no-include` to clear
and reset the list of patterns.

--exclude <pattern>::

Do not pack refs matching the given `glob(7)` pattern. Repetitions of this option
accumulate exclusion patterns. Use `--no-exclude` to clear and reset the list of
patterns. If a ref is already packed, including it with `--exclude` will not
unpack it.
+
When used with `--all`, pack only loose refs which do not match any of
the provided `--exclude` patterns.
+
When used with `--include`, refs provided to `--include`, minus refs that are
provided to `--exclude` will be packed.
4 changes: 2 additions & 2 deletions Documentation/technical/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ api_index = custom_target(
output: 'api-index.adoc',
)

custom_target(
doc_targets += custom_target(
command: asciidoc_html_options,
input: api_index,
output: 'api-index.html',
Expand All @@ -56,7 +56,7 @@ custom_target(
)

foreach article : api_docs + articles
custom_target(
doc_targets += custom_target(
command: asciidoc_html_options,
input: article,
output: fs.stem(article) + '.html',
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,9 @@ BUILT_INS += git-stage$X
BUILT_INS += git-status$X
BUILT_INS += git-switch$X
BUILT_INS += git-version$X
ifndef WITH_BREAKING_CHANGES
BUILT_INS += git-whatchanged$X
endif

# what 'all' will build but not install in gitexecdir
OTHER_PROGRAMS += git$X
Expand Down Expand Up @@ -974,7 +976,6 @@ LIB_OBJS += blame.o
LIB_OBJS += blob.o
LIB_OBJS += bloom.o
LIB_OBJS += branch.o
LIB_OBJS += bulk-checkin.o
LIB_OBJS += bundle-uri.o
LIB_OBJS += bundle.o
LIB_OBJS += cache-tree.o
Expand Down Expand Up @@ -1094,6 +1095,7 @@ LIB_OBJS += pack-bitmap.o
LIB_OBJS += pack-check.o
LIB_OBJS += pack-mtimes.o
LIB_OBJS += pack-objects.o
LIB_OBJS += pack-refs.o
LIB_OBJS += pack-revindex.o
LIB_OBJS += pack-write.o
LIB_OBJS += packfile.o
Expand Down
7 changes: 4 additions & 3 deletions builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
#include "gettext.h"
#include "pathspec.h"
#include "run-command.h"
#include "object-file.h"
#include "odb.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
#include "diff.h"
#include "read-cache.h"
#include "revision.h"
#include "bulk-checkin.h"
#include "strvec.h"
#include "submodule.h"
#include "add-interactive.h"
Expand Down Expand Up @@ -575,7 +576,7 @@ int cmd_add(int argc,
string_list_clear(&only_match_skip_worktree, 0);
}

transaction = begin_odb_transaction(repo->objects);
transaction = odb_transaction_begin(repo->objects);

ps_matched = xcalloc(pathspec.nr, 1);
if (add_renormalize)
Expand All @@ -594,7 +595,7 @@ int cmd_add(int argc,

if (chmod_arg && pathspec.nr)
exit_status |= chmod_pathspec(repo, &pathspec, chmod_arg[0], show_only);
end_odb_transaction(transaction);
odb_transaction_commit(transaction);

finish:
if (write_locked_index(repo->index, &lock_file,
Expand Down
Loading