Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
0dfca98
Merge branch 'ps/object-wo-the-repository' into ps/object-file-cleanup
gitster Apr 8, 2025
d1fa670
object-file: move `mkdir_in_gitdir()` into "path.c"
pks-t Apr 15, 2025
1a99fe8
object-file: move `safe_create_leading_directories()` into "path.c"
pks-t Apr 15, 2025
97dc141
object-file: move `git_open_cloexec()` to "compat/open.c"
pks-t Apr 15, 2025
632b5e3
object-file: move `xmmap()` into "wrapper.c"
pks-t Apr 15, 2025
d9f517d
object-file: split out functions relating to object store subsystem
pks-t Apr 15, 2025
70c0f9d
object-file: split up concerns of `HASH_*` flags
pks-t Apr 15, 2025
8a54ebd
object-file: drop `index_blob_stream()`
pks-t Apr 15, 2025
a36d513
object: split out functions relating to object store subsystem
pks-t Apr 15, 2025
176a65e
object-store: remove global array of cached objects
pks-t Apr 15, 2025
68cd492
object-store: merge "object-store-ll.h" and "object-store.h"
pks-t Apr 15, 2025
1b2eee9
docs: document core.hooksPath=/dev/null
derrickstolee Apr 16, 2025
dccf129
t9811: be more precise to check importing of tags
wang-anthony03 Apr 16, 2025
0d07e06
meson.build: remove -DCURL_DISABLE_TYPECHECK
ramsay-jones Apr 16, 2025
507c63f
Makefile: only set some BASIC_CFLAGS when RUNTIME_PREFIX is set
ramsay-jones Apr 16, 2025
65e3757
meson.build: only set build variables for non-default values
ramsay-jones Apr 16, 2025
214e2c6
meson.build: set default help format to html on windows
ramsay-jones Apr 16, 2025
ead39b2
Makefile: remove NEEDS_LIBRT build variable
ramsay-jones Apr 16, 2025
26a8b23
config.mak.uname: add a note about NO_STRLCPY for Linux
ramsay-jones Apr 16, 2025
064eed3
config.mak.uname: only set NO_REGEX on cygwin for v1.7
ramsay-jones Apr 16, 2025
394c4df
config.mak.uname: add HAVE_GETDELIM to the cygwin section
ramsay-jones Apr 16, 2025
a45ca6f
config.mak.uname: add clock_gettime() to the cygwin build
ramsay-jones Apr 16, 2025
c9a5177
builtin/gc.c: correct RAM calculation when using sysinfo
ramsay-jones Apr 16, 2025
50dec7c
config.mak.uname: add sysinfo() configuration for cygwin
ramsay-jones Apr 16, 2025
70ef34c
config.mak.uname: add arc4random to the cygwin build
ramsay-jones Apr 16, 2025
8f282bd
parse: fix off-by-one for minimum signed values
pks-t Apr 17, 2025
d012ceb
global: use designated initializers for options
pks-t Apr 17, 2025
8ff1a34
parse-options: support unit factors in `OPT_INTEGER()`
pks-t Apr 17, 2025
785c17d
parse-options: rename `OPT_MAGNITUDE()` to `OPT_UNSIGNED()`
pks-t Apr 17, 2025
0970569
parse-options: introduce precision handling for `OPTION_INTEGER`
pks-t Apr 17, 2025
bc288c5
parse-options: introduce precision handling for `OPTION_UNSIGNED`
pks-t Apr 17, 2025
791aedd
parse-options: detect mismatches in integer signedness
pks-t Apr 17, 2025
cdda67d
config.mak.uname: set CSPRNG_METHOD to getrandom on Linux
ramsay-jones Apr 16, 2025
ee40e26
t9811: fix misconversion of tests
gitster Apr 18, 2025
b0026da
ci: skip unavailable external software
gitster Apr 24, 2025
d5b8a70
Merge branch 'dd/sparse-glibc-workaround' into maint-2.49
gitster Apr 25, 2025
8829bbf
Merge branch 'js/ci-github-update-ubuntu' into maint-2.49
gitster Apr 25, 2025
051923e
Merge branch 'js/ci-fedora-gawk' into maint-2.49
gitster Apr 25, 2025
a910fda
Merge branch 'jc/ci-skip-unavailable-external-software' into maint-2.49
gitster Apr 25, 2025
d50a5e8
CI updates
gitster Apr 25, 2025
cbe2267
Merge branch 'jc/ci-skip-unavailable-external-software'
gitster Apr 25, 2025
51ddc12
Merge branch 'aw/t9811-modernize'
gitster Apr 25, 2025
36d8035
Merge branch 'ps/object-file-cleanup'
gitster Apr 25, 2025
68e5342
Merge branch 'ds/doc-disable-hooks'
gitster Apr 25, 2025
2bc5414
Merge branch 'ps/parse-options-integers'
gitster Apr 25, 2025
028c432
Merge branch 'rj/build-tweaks'
gitster Apr 25, 2025
e09ffef
Sync with 'maint'
gitster Apr 25, 2025
f65182a
The ninth batch
gitster Apr 25, 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
14 changes: 14 additions & 0 deletions Documentation/RelNotes/2.50.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ Performance, Internal Implementation, Development Support etc.

* Optimize the code to dedup references recorded in a bundle file.

* Update parse-options API to catch mistakes to pass address of an
integral variable of a wrong type/size.


Fixes since v2.49
-----------------
Expand Down Expand Up @@ -210,6 +213,17 @@ Fixes since v2.49
any common ancestor, now behaves as expected.
(merge e7ef4be7c2 mh/left-right-limited later to maint).

* Document the convention to disable hooks altogether by setting the
hooksPath configuration variable to /dev/nulll
(merge 1b2eee94f1 ds/doc-disable-hooks later to maint).

* Make sure outage of third-party sites that supply P4, Git-LFS, and
JGit we use for testing would not prevent our CI jobs from running
at all.

* Various build tweaks, including CSPRNG selection on some platforms.
(merge cdda67de03 rj/build-tweaks later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge 227c4f33a0 ja/doc-block-delimiter-markup-fix later to maint).
(merge 2bfd3b3685 ab/decorate-code-cleanup later to maint).
Expand Down
5 changes: 5 additions & 0 deletions Documentation/config/core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ centrally configure your Git hooks instead of configuring them on a
per-repository basis, or as a more flexible and centralized
alternative to having an `init.templateDir` where you've changed
default hooks.
+
You can also disable all hooks entirely by setting `core.hooksPath`
to `/dev/null`. This is usually only advisable for expert users and
on a per-command basis using configuration parameters of the form
`git -c core.hooksPath=/dev/null ...`.

core.editor::
Commands such as `commit` and `tag` that let you edit
Expand Down
20 changes: 20 additions & 0 deletions Documentation/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ if docs_backend == 'asciidoc'
'--attribute=build_dir=' + meson.current_build_dir(),
]

pager_opt = get_option('default_pager')
if pager_opt != '' and pager_opt != 'less'
asciidoc_common_options += '-agit-default-pager=' + pager_opt
endif

editor_opt = get_option('default_editor')
if editor_opt != '' and editor_opt != 'vi'
asciidoc_common_options += '-agit-default-editor=' + editor_opt
endif

documentation_deps = [
asciidoc_conf,
]
Expand Down Expand Up @@ -287,6 +297,16 @@ elif docs_backend == 'asciidoctor'
'--require', 'asciidoctor-extensions',
]

pager_opt = get_option('default_pager')
if pager_opt != '' and pager_opt != 'less'
asciidoc_common_options += '-agit-default-pager=' + pager_opt
endif

editor_opt = get_option('default_editor')
if editor_opt != '' and editor_opt != 'vi'
asciidoc_common_options += '-agit-default-editor=' + editor_opt
endif

documentation_deps = [
asciidoctor_extensions,
]
Expand Down
10 changes: 6 additions & 4 deletions Documentation/technical/api-parse-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,13 @@ There are some macros to easily define options:
Use of `--no-option` will clear the list of preceding values.

`OPT_INTEGER(short, long, &int_var, description)`::
Introduce an option with integer argument.
The integer is put into `int_var`.
Introduce an option with integer argument. The argument must be a
integer and may include a suffix of 'k', 'm' or 'g' to
scale the provided value by 1024, 1024^2 or 1024^3 respectively.
The scaled value is put into `int_var`.

`OPT_MAGNITUDE(short, long, &unsigned_long_var, description)`::
Introduce an option with a size argument. The argument must be a
`OPT_UNSIGNED(short, long, &unsigned_long_var, description)`::
Introduce an option with an unsigned integer argument. The argument must be a
non-negative integer and may include a suffix of 'k', 'm' or 'g' to
scale the provided value by 1024, 1024^2 or 1024^3 respectively.
The scaled value is put into `unsigned_long_var`.
Expand Down
48 changes: 25 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ include shared.mak
#
# Define HAVE_SYNC_FILE_RANGE if your platform has sync_file_range.
#
# Define NEEDS_LIBRT if your platform requires linking with librt (glibc version
# before 2.17) for clock_gettime and CLOCK_MONOTONIC.
#
# Define HAVE_BSD_SYSCTL if your platform has a BSD-compatible sysctl function.
#
# Define HAVE_GETDELIM if your system has the getdelim() function.
Expand Down Expand Up @@ -994,6 +991,7 @@ LIB_OBJS += common-exit.o
LIB_OBJS += common-init.o
LIB_OBJS += compat/nonblock.o
LIB_OBJS += compat/obstack.o
LIB_OBJS += compat/open.o
LIB_OBJS += compat/terminal.o
LIB_OBJS += compiler-tricks/not-constant.o
LIB_OBJS += config.o
Expand Down Expand Up @@ -1084,6 +1082,7 @@ LIB_OBJS += notes.o
LIB_OBJS += object-file-convert.o
LIB_OBJS += object-file.o
LIB_OBJS += object-name.o
LIB_OBJS += object-store.o
LIB_OBJS += object.o
LIB_OBJS += oid-array.o
LIB_OBJS += oidmap.o
Expand Down Expand Up @@ -1811,7 +1810,6 @@ ifdef FREAD_READS_DIRECTORIES
endif
ifdef OPEN_RETURNS_EINTR
COMPAT_CFLAGS += -DOPEN_RETURNS_EINTR
COMPAT_OBJS += compat/open.o
endif
ifdef NO_SYMLINK_HEAD
BASIC_CFLAGS += -DNO_SYMLINK_HEAD
Expand Down Expand Up @@ -2173,18 +2171,14 @@ ifdef HAVE_SYNC_FILE_RANGE
BASIC_CFLAGS += -DHAVE_SYNC_FILE_RANGE
endif

ifdef NEEDS_LIBRT
EXTLIBS += -lrt
ifdef HAVE_SYSINFO
BASIC_CFLAGS += -DHAVE_SYSINFO
endif

ifdef HAVE_BSD_SYSCTL
BASIC_CFLAGS += -DHAVE_BSD_SYSCTL
endif

ifdef HAVE_BSD_KERN_PROC_SYSCTL
BASIC_CFLAGS += -DHAVE_BSD_KERN_PROC_SYSCTL
endif

ifdef HAVE_GETDELIM
BASIC_CFLAGS += -DHAVE_GETDELIM
endif
Expand Down Expand Up @@ -2215,25 +2209,33 @@ ifneq ($(findstring openssl,$(CSPRNG_METHOD)),)
EXTLIBS += -lcrypto -lssl
endif

ifneq ($(PROCFS_EXECUTABLE_PATH),)
procfs_executable_path_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(procfs_executable_path_SQ)"'
endif

ifndef HAVE_PLATFORM_PROCINFO
COMPAT_OBJS += compat/stub/procinfo.o
endif

ifdef HAVE_NS_GET_EXECUTABLE_PATH
BASIC_CFLAGS += -DHAVE_NS_GET_EXECUTABLE_PATH
endif
ifdef RUNTIME_PREFIX

ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
BASIC_CFLAGS += -DHAVE_ZOS_GET_EXECUTABLE_PATH
endif
ifdef HAVE_BSD_KERN_PROC_SYSCTL
BASIC_CFLAGS += -DHAVE_BSD_KERN_PROC_SYSCTL
endif

ifneq ($(PROCFS_EXECUTABLE_PATH),)
pep_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(pep_SQ)"'
endif

ifdef HAVE_NS_GET_EXECUTABLE_PATH
BASIC_CFLAGS += -DHAVE_NS_GET_EXECUTABLE_PATH
endif

ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
BASIC_CFLAGS += -DHAVE_ZOS_GET_EXECUTABLE_PATH
endif

ifdef HAVE_WPGMPTR
BASIC_CFLAGS += -DHAVE_WPGMPTR
endif

ifdef HAVE_WPGMPTR
BASIC_CFLAGS += -DHAVE_WPGMPTR
endif

ifdef FILENO_IS_A_MACRO
Expand Down
6 changes: 3 additions & 3 deletions apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "abspath.h"
#include "base85.h"
#include "config.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "delta.h"
#include "diff.h"
#include "dir.h"
Expand Down Expand Up @@ -5123,8 +5123,8 @@ int apply_parse_options(int argc, const char **argv,
/* Think twice before adding "--nul" synonym to this */
OPT_SET_INT('z', NULL, &state->line_termination,
N_("paths are separated with NUL character"), '\0'),
OPT_INTEGER('C', NULL, &state->p_context,
N_("ensure at least <n> lines of context match")),
OPT_UNSIGNED('C', NULL, &state->p_context,
N_("ensure at least <n> lines of context match")),
OPT_CALLBACK(0, "whitespace", state, N_("action"),
N_("detect new or modified lines that have whitespace errors"),
apply_option_parse_whitespace),
Expand Down
2 changes: 1 addition & 1 deletion archive-tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "hex.h"
#include "tar.h"
#include "archive.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "strbuf.h"
#include "streaming.h"
#include "run-command.h"
Expand Down
2 changes: 1 addition & 1 deletion archive-zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "hex.h"
#include "streaming.h"
#include "utf8.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "strbuf.h"
#include "userdiff.h"
#include "write-or-die.h"
Expand Down
37 changes: 27 additions & 10 deletions archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "pretty.h"
#include "setup.h"
#include "refs.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "commit.h"
#include "tree.h"
#include "tree-walk.h"
Expand Down Expand Up @@ -650,20 +650,37 @@ static int parse_archive_args(int argc, const char **argv,
OPT_STRING(0, "format", &format, N_("fmt"), N_("archive format")),
OPT_STRING(0, "prefix", &base, N_("prefix"),
N_("prepend prefix to each pathname in the archive")),
{ OPTION_CALLBACK, 0, "add-file", args, N_("file"),
N_("add untracked file to archive"), 0, add_file_cb,
(intptr_t)&base },
{ OPTION_CALLBACK, 0, "add-virtual-file", args,
N_("path:content"), N_("add untracked file to archive"), 0,
add_file_cb, (intptr_t)&base },
{
.type = OPTION_CALLBACK,
.long_name = "add-file",
.value = args,
.argh = N_("file"),
.help = N_("add untracked file to archive"),
.callback = add_file_cb,
.defval = (intptr_t) &base,
},
{
.type = OPTION_CALLBACK,
.long_name = "add-virtual-file",
.value = args,
.argh = N_("path:content"),
.help = N_("add untracked file to archive"),
.callback = add_file_cb,
.defval = (intptr_t) &base,
},
OPT_STRING('o', "output", &output, N_("file"),
N_("write the archive to this file")),
OPT_BOOL(0, "worktree-attributes", &worktree_attributes,
N_("read .gitattributes in working directory")),
OPT__VERBOSE(&verbose, N_("report archived files on stderr")),
{ OPTION_STRING, 0, "mtime", &mtime_option, N_("time"),
N_("set modification time of archive entries"),
PARSE_OPT_NONEG },
{
.type = OPTION_STRING,
.long_name = "mtime",
.value = &mtime_option,
.argh = N_("time"),
.help = N_("set modification time of archive entries"),
.flags = PARSE_OPT_NONEG,
},
OPT_NUMBER_CALLBACK(&compression_level,
N_("set compression level"), number_callback),
OPT_GROUP(""),
Expand Down
2 changes: 1 addition & 1 deletion attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "read-cache-ll.h"
#include "refs.h"
#include "revision.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "setup.h"
#include "thread-utils.h"
#include "tree-walk.h"
Expand Down
2 changes: 1 addition & 1 deletion bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "commit-slab.h"
#include "commit-reach.h"
#include "object-name.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "path.h"
#include "dir.h"

Expand Down
4 changes: 2 additions & 2 deletions blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "git-compat-util.h"
#include "refs.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "cache-tree.h"
#include "mergesort.h"
#include "commit.h"
Expand Down Expand Up @@ -277,7 +277,7 @@ static struct commit *fake_working_tree_commit(struct repository *r,
convert_to_git(r->index, path, buf.buf, buf.len, &buf, 0);
origin->file.ptr = buf.buf;
origin->file.size = buf.len;
pretend_object_file(buf.buf, buf.len, OBJ_BLOB, &origin->blob_oid);
pretend_object_file(the_repository, buf.buf, buf.len, OBJ_BLOB, &origin->blob_oid);

/*
* Read the current index, replace the path entry with
Expand Down
28 changes: 20 additions & 8 deletions builtin/am.c
Original file line number Diff line number Diff line change
Expand Up @@ -2400,11 +2400,16 @@ int cmd_am(int argc,
OPT_CMDMODE(0, "quit", &resume_mode,
N_("abort the patching operation but keep HEAD where it is"),
RESUME_QUIT),
{ OPTION_CALLBACK, 0, "show-current-patch", &resume_mode,
"(diff|raw)",
N_("show the patch being applied"),
PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
parse_opt_show_current_patch, RESUME_SHOW_PATCH_RAW },
{
.type = OPTION_CALLBACK,
.long_name = "show-current-patch",
.value = &resume_mode,
.argh = "(diff|raw)",
.help = N_("show the patch being applied"),
.flags = PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
.callback = parse_opt_show_current_patch,
.defval = RESUME_SHOW_PATCH_RAW,
},
OPT_CMDMODE(0, "retry", &resume_mode,
N_("try to apply current patch again"),
RESUME_APPLY),
Expand All @@ -2417,9 +2422,16 @@ int cmd_am(int argc,
OPT_BOOL(0, "ignore-date", &state.ignore_date,
N_("use current timestamp for author date")),
OPT_RERERE_AUTOUPDATE(&state.allow_rerere_autoupdate),
{ OPTION_STRING, 'S', "gpg-sign", &state.sign_commit, N_("key-id"),
N_("GPG-sign commits"),
PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
{
.type = OPTION_STRING,
.short_name = 'S',
.long_name = "gpg-sign",
.value = &state.sign_commit,
.argh = N_("key-id"),
.help = N_("GPG-sign commits"),
.flags = PARSE_OPT_OPTARG,
.defval = (intptr_t) "",
},
OPT_CALLBACK_F(0, "empty", &state.empty_type, "(stop|drop|keep)",
N_("how to handle empty patches"),
PARSE_OPT_NONEG, am_option_parse_empty),
Expand Down
6 changes: 3 additions & 3 deletions builtin/backfill.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "tree.h"
#include "tree-walk.h"
#include "object.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "oid-array.h"
#include "oidset.h"
#include "promisor-remote.h"
Expand Down Expand Up @@ -123,8 +123,8 @@ int cmd_backfill(int argc, const char **argv, const char *prefix, struct reposit
.sparse = 0,
};
struct option options[] = {
OPT_INTEGER(0, "min-batch-size", &ctx.min_batch_size,
N_("Minimum number of objects to request at a time")),
OPT_UNSIGNED(0, "min-batch-size", &ctx.min_batch_size,
N_("Minimum number of objects to request at a time")),
OPT_BOOL(0, "sparse", &ctx.sparse,
N_("Restrict the missing objects to the current sparse-checkout")),
OPT_END(),
Expand Down
2 changes: 1 addition & 1 deletion builtin/blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "line-log.h"
#include "progress.h"
#include "object-name.h"
#include "object-store-ll.h"
#include "object-store.h"
#include "pager.h"
#include "blame.h"
#include "refs.h"
Expand Down
Loading