Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
88ce8df
git-daemon doc: update mark-up of synopsis option descriptions
gitster May 10, 2025
914c549
git-{var,write-tree} docs: update mark-up of synopsis option descript…
gitster May 10, 2025
7e7f47a
git-verify-* doc: update mark-up of synopsis option descriptions
gitster May 10, 2025
20e4e9a
git-var doc: fix usage of $ENV_VAR vs ENV_VAR
jnavila May 10, 2025
784cecc
packed-backend: fsck should warn when "packed-refs" file is empty
shejialuo May 14, 2025
a0dee3f
packed-backend: extract snapshot allocation in `load_contents`
shejialuo May 14, 2025
86ddd58
packed-backend: mmap large "packed-refs" file during fsck
shejialuo May 14, 2025
131a8fa
commit: simplify code
dscho May 15, 2025
c607410
fetch: carefully clear local variable's address after use
dscho May 15, 2025
7f3ed75
commit-graph: avoid malloc'ing a local variable
dscho May 15, 2025
bf0468e
upload-pack: rename `enum` to reflect the operation
dscho May 15, 2025
6552684
has_dir_name(): make code more obvious
dscho May 15, 2025
6c91162
fetch: avoid unnecessary work when there is no current branch
dscho May 15, 2025
3d39bcd
Avoid redundant conditions
dscho May 15, 2025
fc451e6
trace2: avoid "futile conditional"
dscho May 15, 2025
ee63d02
commit-graph: avoid using stale stack addresses
dscho May 15, 2025
d7cfbd4
bundle-uri: avoid using undefined output of `sscanf()`
dscho May 15, 2025
2248833
sequencer: stop pretending that an assignment is a condition
dscho May 15, 2025
56f1cd1
mailinfo: fix pointential memory leak if `decode_header` failed
brandb97 May 13, 2025
044511f
sequencer: fix memory leak if `todo_list_rearrange_squash()` failed
brandb97 May 14, 2025
beccbdd
commit-graph: fix memory leak when `fill_oids_from_packs()` fails
brandb97 May 9, 2025
53eeed0
object-file.h: fix typo in variable declaration
peff May 16, 2025
f227fc7
cat-file: make --allow-unknown-type a noop
peff May 16, 2025
ae24b03
object-file: drop OBJECT_INFO_ALLOW_UNKNOWN_TYPE flag
peff May 16, 2025
aac2abe
cat-file: use type enum instead of buffer for -t option
peff May 16, 2025
b32b434
oid_object_info_convert(): stop using string for object type
peff May 16, 2025
4ae0e94
fsck: stop using object_info->type_name strbuf
peff May 16, 2025
d295638
oid_object_info(): drop type_name strbuf
peff May 16, 2025
f2ed511
t/helper: add zlib test-tool
peff May 16, 2025
b5643b6
t: add lib-loose.sh
peff May 16, 2025
65a6a79
hash-object: stop allowing unknown types
peff May 16, 2025
931e5ca
hash-object: merge HASH_* and INDEX_* flags
peff May 16, 2025
f710fd7
hash-object: handle --literally with OPT_NEGBIT
peff May 16, 2025
141f8c8
object-file: drop support for writing objects with unknown types
peff May 16, 2025
ea8a71b
userdiff: extend Bash pattern to cover more shell function forms
Mou887 May 16, 2025
952de28
apply: integrate with the sparse index
derrickstolee May 16, 2025
02ed855
git add: make -p/-i aware of sparse index
derrickstolee May 16, 2025
efab7dc
reset: integrate sparse index with --patch
derrickstolee May 16, 2025
ecf9ba2
p2000: add performance test for patch-mode commands
derrickstolee May 16, 2025
e426672
sequencer: make it clearer that commit descriptions are just comments
newren May 16, 2025
c6d5ca1
merge-ort: add a new mergeability_only option
newren May 16, 2025
29d7bf1
merge-tree: add a new --quiet flag
newren May 16, 2025
3749b8a
docs: remove unused mentoring mailing list reference
jayatheerthkulkarni May 18, 2025
a1dcf6b
docs: clarify cmd_psuh signature and explain UNUSED macro
jayatheerthkulkarni May 18, 2025
7649d31
docs: replace git_config to repo_config
jayatheerthkulkarni May 18, 2025
cddcee7
meson: reformat default options to workaround bug in `meson configure`
eli-schwartz May 19, 2025
f783b3f
meson.build: quote the GITWEBDIR build configuration
ramsay-jones May 19, 2025
bdb3843
meson: correct install location of YAML.pm
ramsay-jones May 19, 2025
46a626c
meson: correct path to system config/attribute files
ramsay-jones May 19, 2025
837f637
meson.build: correct setting of GIT_EXEC_PATH
ramsay-jones May 19, 2025
187ce02
configure.ac: upgrade to a compilation check for sysinfo
ramsay-jones May 19, 2025
dcb8974
Merge branch 'md/userdiff-bash-shell-function'
gitster May 27, 2025
2426a21
Merge branch 'ly/mailinfo-decode-header-leakfix'
gitster May 27, 2025
6261489
Merge branch 'ly/sequencer-rearrange-leakfix'
gitster May 27, 2025
b6fa7fb
Merge branch 'ly/commit-graph-fill-oids-leakfix'
gitster May 27, 2025
17d9dbd
Merge branch 'jk/no-funny-object-types'
gitster May 27, 2025
f545f40
Merge branch 'en/merge-tree-check'
gitster May 27, 2025
6b6c366
Merge branch 'rj/build-tweaks-part2'
gitster May 27, 2025
6e5fb39
Merge branch 'ds/sparse-apply-add-p'
gitster May 27, 2025
3950f8f
Merge branch 'jc/doc-synopsis-option-markup'
gitster May 27, 2025
d8b48af
Merge branch 'sj/use-mmap-to-check-packed-refs'
gitster May 27, 2025
f9cdaa2
Merge branch 'js/misc-fixes'
gitster May 27, 2025
80f49f2
Merge branch 'en/sequencer-comment-messages'
gitster May 27, 2025
21b0eb0
Merge branch 'es/meson-configure-build-options-fix'
gitster May 27, 2025
e8f4e14
Merge branch 'kj/my-first-contribution-updates'
gitster May 27, 2025
34673cd
The eighteenth batch
gitster May 27, 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
55 changes: 33 additions & 22 deletions Documentation/MyFirstContribution.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ the list by sending an email to <git+subscribe@vger.kernel.org>
The https://lore.kernel.org/git[archive] of this mailing list is
available to view in a browser.

==== https://groups.google.com/forum/#!forum/git-mentoring[git-mentoring@googlegroups.com]

This mailing list is targeted to new contributors and was created as a place to
post questions and receive answers outside of the public eye of the main list.
Veteran contributors who are especially interested in helping mentor newcomers
are present on the list. In order to avoid search indexers, group membership is
required to view messages; anyone can join and no approval is required.

==== https://web.libera.chat/#git-devel[#git-devel] on Libera Chat

This IRC channel is for conversations between Git contributors. If someone is
Expand Down Expand Up @@ -150,15 +142,31 @@ command in `builtin/psuh.c`. Create that file, and within it, write the entry
point for your command in a function matching the style and signature:

----
int cmd_psuh(int argc, const char **argv, const char *prefix)
int cmd_psuh(int argc UNUSED, const char **argv UNUSED,
const char *prefix UNUSED, struct repository *repo UNUSED)
----

A few things to note:

* A subcommand implementation takes its command line arguments
in `int argc` + `const char **argv`, like `main()` would.

* It also takes two extra parameters, `prefix` and `repo`. What
they mean will not be discussed until much later.

* Because this first example will not use any of the parameters,
your compiler will give warnings on unused parameters. As the
list of these four parameters is mandated by the API to add
new built-in commands, you cannot omit them. Instead, you add
`UNUSED` to each of them to tell the compiler that you *know*
you are not (yet) using it.

We'll also need to add the declaration of psuh; open up `builtin.h`, find the
declaration for `cmd_pull`, and add a new line for `psuh` immediately before it,
in order to keep the declarations alphabetically sorted:

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

Be sure to `#include "builtin.h"` in your `psuh.c`. You'll also need to
Expand All @@ -174,7 +182,8 @@ Throughout the tutorial, we will mark strings for translation as necessary; you
should also do so when writing your user-facing commands in the future.

----
int cmd_psuh(int argc, const char **argv, const char *prefix)
int cmd_psuh(int argc UNUSED, const char **argv UNUSED,
const char *prefix UNUSED, struct repository *repo UNUSED)
{
printf(_("Pony saying hello goes here.\n"));
return 0;
Expand Down Expand Up @@ -287,8 +296,9 @@ on the reference implementation linked at the top of this document.
It's probably useful to do at least something besides printing out a string.
Let's start by having a look at everything we get.

Modify your `cmd_psuh` implementation to dump the args you're passed, keeping
existing `printf()` calls in place:
Modify your `cmd_psuh` implementation to dump the args you're passed,
keeping existing `printf()` calls in place; because the args are now
used, remove the `UNUSED` macro from them:

----
int i;
Expand All @@ -312,26 +322,27 @@ on the command line, including the name of our command. (If `prefix` is empty
for you, try `cd Documentation/ && ../bin-wrappers/git psuh`). That's not so
helpful. So what other context can we get?

Add a line to `#include "config.h"`. Then, add the following bits to the
Add a line to `#include "config.h"` and `#include "repository.h"`.
Then, add the following bits to the function body:
function body:

----
const char *cfg_name;

...

git_config(git_default_config, NULL);
if (git_config_get_string_tmp("user.name", &cfg_name) > 0)
repo_config(repo, git_default_config, NULL);
if (repo_config_get_string_tmp(repo, "user.name", &cfg_name))
printf(_("No name is found in config\n"));
else
printf(_("Your name: %s\n"), cfg_name);
----

`git_config()` will grab the configuration from config files known to Git and
apply standard precedence rules. `git_config_get_string_tmp()` will look up
`repo_config()` will grab the configuration from config files known to Git and
apply standard precedence rules. `repo_config_get_string_tmp()` will look up
a specific key ("user.name") and give you the value. There are a number of
single-key lookup functions like this one; you can see them all (and more info
about how to use `git_config()`) in `Documentation/technical/api-config.adoc`.
about how to use `repo_config()`) in `Documentation/technical/api-config.adoc`.

You should see that the name printed matches the one you see when you run:

Expand Down Expand Up @@ -364,7 +375,7 @@ status_init_config(&s, git_status_config);
----

But as we drill down, we can find that `status_init_config()` wraps a call
to `git_config()`. Let's modify the code we wrote in the previous commit.
to `repo_config()`. Let's modify the code we wrote in the previous commit.

Be sure to include the header to allow you to use `struct wt_status`:

Expand All @@ -380,8 +391,8 @@ prepare it, and print its contents:

...

wt_status_prepare(the_repository, &status);
git_config(git_default_config, &status);
wt_status_prepare(repo, &status);
repo_config(repo, git_default_config, &status);

...

Expand Down
24 changes: 24 additions & 0 deletions Documentation/RelNotes/2.50.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ UI, Workflows & Features
been under "scalar"'s control are taught an option not to enable the
scheduled maintenance on it.

* The userdiff pattern for shell scripts has been updated to cope
with more bash-isms.

* "git merge-tree" learned an option to see if it resolves cleanly
without actually creating a result.

* The commit title in the "rebase -i" todo file are now prefixed with
'#', just like a merge commit being replayed.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -167,6 +176,15 @@ Performance, Internal Implementation, Development Support etc.
* The dependency on the_repository variable has been reduced from the
code paths in "git replay".

* Support to create a loose object file with unknown object type has
been dropped.

* The code path to access the "packed-refs" file while "fsck" is
taught to mmap the file, instead of reading the whole file in the
memory.

* Assorted fixes for issues found with CodeQL.


Fixes since v2.49
-----------------
Expand Down Expand Up @@ -325,6 +343,10 @@ Fixes since v2.49
automatically (as opposed to be done only upon manual request).
(merge 6389579b2f ps/ci-gitlab-enable-msvc-meson-job later to maint).

* "git apply" and "git add -i/-p" code paths no longer unnecessarily
expand sparse-index while working.
(merge ecf9ba20e3 ds/sparse-apply-add-p 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 Expand Up @@ -355,3 +377,5 @@ Fixes since v2.49
(merge e5dd0a05ed ly/am-split-stgit-leakfix later to maint).
(merge bac220e154 rc/t1001-test-path-is-file later to maint).
(merge 91db6c735d ly/reftable-writer-leakfix later to maint).
(merge 20e4e9ad0b jc/doc-synopsis-option-markup later to maint).
(merge cddcee7f64 es/meson-configure-build-options-fix later to maint).
6 changes: 6 additions & 0 deletions Documentation/fsck-msgids.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
`emptyName`::
(WARN) A path contains an empty name.

`emptyPackedRefsFile`::
(INFO) "packed-refs" file is empty. Report to the
git@vger.kernel.org mailing list if you see this error. As only
very early versions of Git would create such an empty
"packed_refs" file, we might tighten this rule in the future.

`extraHeaderEntry`::
(IGNORE) Extra headers found after `tagger`.

Expand Down
6 changes: 1 addition & 5 deletions Documentation/git-cat-file.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ SYNOPSIS
--------
[verse]
'git cat-file' <type> <object>
'git cat-file' (-e | -p) <object>
'git cat-file' (-t | -s) [--allow-unknown-type] <object>
'git cat-file' (-e | -p | -t | -s) <object>
'git cat-file' (--textconv | --filters)
[<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]
'git cat-file' (--batch | --batch-check | --batch-command) [--batch-all-objects]
Expand Down Expand Up @@ -202,9 +201,6 @@ flush::
only once, even if it is stored multiple times in the
repository.

--allow-unknown-type::
Allow `-s` or `-t` to query broken/corrupt objects of unknown type.

--follow-symlinks::
With `--batch` or `--batch-check`, follow symlinks inside the
repository when requesting objects with extended SHA-1
Expand Down
Loading