Skip to content

Commit a644284

Browse files
committed
Autogenerated HTML docs for v2.50.0-81-gcb3b4
1 parent e4c888f commit a644284

29 files changed

+576
-349
lines changed

MyFirstObjectWalk.adoc

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:
4343
#include "builtin.h"
4444
#include "trace.h"
4545
46-
int cmd_walken(int argc, const char **argv, const char *prefix)
46+
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
4747
{
4848
trace_printf(_("cmd_walken incoming...\n"));
4949
return 0;
@@ -86,7 +86,7 @@ int cmd_walken(int argc, const char **argv, const char *prefix)
8686
Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:
8787

8888
----
89-
int cmd_walken(int argc, const char **argv, const char *prefix);
89+
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);
9090
----
9191

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

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

102+
- In the `Makefile`:
101103
----
104+
...
102105
BUILTIN_OBJS += builtin/walken.o
106+
...
107+
----
108+
109+
- In the `meson.build` file:
110+
----
111+
builtin_sources = [
112+
...
113+
'builtin/walken.c',
114+
...
115+
]
103116
----
104117

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

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

224-
Make sure to invoke `git_config()` with it in your `cmd_walken()`:
237+
Make sure to invoke `repo_config()` with it in your `cmd_walken()`:
225238

226239
----
227-
int cmd_walken(int argc, const char **argv, const char *prefix)
240+
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
228241
{
229242
...
230243
231-
git_config(git_walken_config, NULL);
244+
repo_config(repo, git_walken_config, NULL);
232245
233246
...
234247
}
@@ -250,14 +263,14 @@ We'll also need to include the `revision.h` header:
250263
251264
...
252265
253-
int cmd_walken(int argc, const char **argv, const char *prefix)
266+
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
254267
{
255268
/* This can go wherever you like in your declarations.*/
256269
struct rev_info rev;
257270
...
258271
259-
/* This should go after the git_config() call. */
260-
repo_init_revisions(the_repository, &rev, prefix);
272+
/* This should go after the repo_config() call. */
273+
repo_init_revisions(repo, &rev, prefix);
261274
262275
...
263276
}
@@ -305,7 +318,7 @@ Then let's invoke `final_rev_info_setup()` after the call to
305318
`repo_init_revisions()`:
306319

307320
----
308-
int cmd_walken(int argc, const char **argv, const char *prefix)
321+
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
309322
{
310323
...
311324

MyFirstObjectWalk.html

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ <h2 id="_setting_up">Setting Up</h2>
507507
#include "builtin.h"
508508
#include "trace.h"
509509

510-
int cmd_walken(int argc, const char **argv, const char *prefix)
510+
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
511511
{
512512
trace_printf(_("cmd_walken incoming...\n"));
513513
return 0;
@@ -564,7 +564,7 @@ <h2 id="_setting_up">Setting Up</h2>
564564
</div>
565565
<div class="listingblock">
566566
<div class="content">
567-
<pre>int cmd_walken(int argc, const char **argv, const char *prefix);</pre>
567+
<pre>int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);</pre>
568568
</div>
569569
</div>
570570
<div class="paragraph">
@@ -577,11 +577,37 @@ <h2 id="_setting_up">Setting Up</h2>
577577
</div>
578578
</div>
579579
<div class="paragraph">
580-
<p>Add it to the <code>Makefile</code> near the line for <code>builtin/worktree.o</code>:</p>
580+
<p>Add an entry for the new command in the both the Make and Meson build system,
581+
before the entry for <code>worktree</code>:</p>
582+
</div>
583+
<div class="ulist">
584+
<ul>
585+
<li>
586+
<p>In the <code>Makefile</code>:</p>
587+
</li>
588+
</ul>
589+
</div>
590+
<div class="listingblock">
591+
<div class="content">
592+
<pre>...
593+
BUILTIN_OBJS += builtin/walken.o
594+
...</pre>
595+
</div>
596+
</div>
597+
<div class="ulist">
598+
<ul>
599+
<li>
600+
<p>In the <code>meson.build</code> file:</p>
601+
</li>
602+
</ul>
581603
</div>
582604
<div class="listingblock">
583605
<div class="content">
584-
<pre>BUILTIN_OBJS += builtin/walken.o</pre>
606+
<pre>builtin_sources = [
607+
...
608+
'builtin/walken.c',
609+
...
610+
]</pre>
585611
</div>
586612
</div>
587613
<div class="paragraph">
@@ -734,7 +760,7 @@ <h4 id="_configuring_from_gitconfig">Configuring From .<code>gitconfig</code></h
734760
<div class="paragraph">
735761
<p>Next, we should have a look at any relevant configuration settings (i.e.,
736762
settings readable and settable from <code>git</code> <code>config</code>). This is done by providing a
737-
callback to <code>git_config</code>(); within that callback, you can also invoke methods
763+
callback to <code>repo_config</code>(); within that callback, you can also invoke methods
738764
from other components you may need that need to intercept these options. Your
739765
callback will be invoked once per each configuration value which Git knows about
740766
(global, local, worktree, etc.).</p>
@@ -766,15 +792,15 @@ <h4 id="_configuring_from_gitconfig">Configuring From .<code>gitconfig</code></h
766792
</div>
767793
</div>
768794
<div class="paragraph">
769-
<p>Make sure to invoke <code>git_config</code>() with it in your <code>cmd_walken</code>():</p>
795+
<p>Make sure to invoke <code>repo_config</code>() with it in your <code>cmd_walken</code>():</p>
770796
</div>
771797
<div class="listingblock">
772798
<div class="content">
773-
<pre>int cmd_walken(int argc, const char **argv, const char *prefix)
799+
<pre>int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
774800
{
775801
...
776802

777-
git_config(git_walken_config, NULL);
803+
repo_config(repo, git_walken_config, NULL);
778804

779805
...
780806
}</pre>
@@ -800,14 +826,14 @@ <h4 id="_setting_up_rev_info">Setting Up <code>rev_info</code></h4>
800826

801827
...
802828

803-
int cmd_walken(int argc, const char **argv, const char *prefix)
829+
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
804830
{
805831
/* This can go wherever you like in your declarations.*/
806832
struct rev_info rev;
807833
...
808834

809-
/* This should go after the git_config() call. */
810-
repo_init_revisions(the_repository, &amp;rev, prefix);
835+
/* This should go after the repo_config() call. */
836+
repo_init_revisions(repo, &amp;rev, prefix);
811837

812838
...
813839
}</pre>
@@ -871,7 +897,7 @@ <h4 id="_tweaking_rev_info_for_the_walk">Tweaking <code>rev_info</code> For the
871897
</div>
872898
<div class="listingblock">
873899
<div class="content">
874-
<pre>int cmd_walken(int argc, const char **argv, const char *prefix)
900+
<pre>int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
875901
{
876902
...
877903

@@ -1675,7 +1701,7 @@ <h2 id="_wrapping_up">Wrapping Up</h2>
16751701
</div>
16761702
<div id="footer">
16771703
<div id="footer-text">
1678-
Last updated 2025-03-26 00:41:02 -0700
1704+
Last updated 2025-06-18 14:54:41 -0700
16791705
</div>
16801706
</div>
16811707
</body>

RelNotes/2.51.0.adoc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Git v2.51 Release Notes
2+
=======================
3+
4+
UI, Workflows & Features
5+
------------------------
6+
7+
* Userdiff patterns for the R language have been added.
8+
9+
* Documentation for "git send-email" has been updated with a bit more
10+
credential helper and OAuth information.
11+
12+
* "git cat-file --batch" learns to understand %(objectmode) atom to
13+
allow the caller to tell missing objects (due to repository
14+
corruption) and submodules (whose commit objects are OK to be
15+
missing) apart.
16+
17+
* "git diff --no-index dirA dirB" can limit the comparison with
18+
pathspec at the end of the command line, just like normal "git
19+
diff".
20+
21+
22+
Performance, Internal Implementation, Development Support etc.
23+
--------------------------------------------------------------
24+
25+
* "git pack-objects" learned to find delta bases from blobs at the
26+
same path, using the --path-walk API.
27+
28+
* CodingGuidelines update.
29+
30+
* Add settings for Solaris 10 & 11.
31+
32+
* Meson-based build/test framework now understands TAP output
33+
generated by our tests.
34+
35+
36+
Fixes since v2.50
37+
-----------------
38+
39+
* A memory-leak in an error code path has been plugged.
40+
(merge 7082da85cb ly/commit-graph-graph-write-leakfix later to maint).
41+
42+
* A memory-leak in an error code path has been plugged.
43+
(merge aedebdb6b9 ly/fetch-pack-leakfix later to maint).
44+
45+
* Some leftover references to documentation source files that no
46+
longer exist, due to recent ".txt" -> ".adoc" renaming, have been
47+
corrected.
48+
(merge 3717a5775a jw/doc-txt-to-adoc-refs later to maint).
49+
50+
* Other code cleanup, docfix, build fix, etc.
51+
(merge b257adb571 lo/my-first-ow-doc-update later to maint).
52+
(merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
53+
(merge 5dceb8bd05 ly/do-not-localize-bug-messages later to maint).
54+
(merge 61372dd613 ly/commit-buffer-reencode-leakfix later to maint).
55+
(merge 81cd1eef7d ly/pack-bitmap-root-leakfix later to maint).
56+
(merge bfc9f9cc64 ly/submodule-update-failure-leakfix later to maint).
57+
(merge 65dff89c6b ma/doc-diff-cc-headers later to maint).
58+
(merge efb61591ee jm/bundle-uri-debug-output-to-fp later to maint).

diff-generate-patch.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ or like this (when the `--cc` option is used):
138138
+
139139
[synopsis]
140140
index <hash>,<hash>..<hash>
141-
mode <mode>,<mode>`..`<mode>
141+
mode <mode>,<mode>..<mode>
142142
new file mode <mode>
143143
deleted file mode <mode>,<mode>
144144
+

git-cat-file.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,11 @@ newline. The available atoms are:
307307
`objecttype`::
308308
The type of the object (the same as `cat-file -t` reports).
309309

310+
`objectmode`::
311+
If the specified object has mode information (such as a tree or
312+
index entry), the mode expressed as an octal integer. Otherwise,
313+
empty string.
314+
310315
`objectsize`::
311316
The size, in bytes, of the object (the same as `cat-file -s`
312317
reports).
@@ -368,6 +373,14 @@ If a name is specified that might refer to more than one object (an ambiguous sh
368373
<object> SP ambiguous LF
369374
------------
370375

376+
If a name is specified that refers to a submodule entry in a tree and the
377+
target object does not exist in the repository, then `cat-file` will ignore
378+
any custom format and print (with the object ID of the submodule):
379+
380+
------------
381+
<oid> SP submodule LF
382+
------------
383+
371384
If `--follow-symlinks` is used, and a symlink in the repository points
372385
outside the repository, then `cat-file` will ignore any custom format
373386
and print:

git-cat-file.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,12 @@ <h2 id="_batch_output">BATCH OUTPUT</h2>
867867
<dd>
868868
<p>The type of the object (the same as <code>cat-file</code> <code>-t</code> reports).</p>
869869
</dd>
870+
<dt class="hdlist1"><code>objectmode</code></dt>
871+
<dd>
872+
<p>If the specified object has mode information (such as a tree or
873+
index entry), the mode expressed as an octal integer. Otherwise,
874+
empty string.</p>
875+
</dd>
870876
<dt class="hdlist1"><code>objectsize</code></dt>
871877
<dd>
872878
<p>The size, in bytes, of the object (the same as <code>cat-file</code> <code>-s</code>
@@ -947,6 +953,16 @@ <h2 id="_batch_output">BATCH OUTPUT</h2>
947953
</div>
948954
</div>
949955
<div class="paragraph">
956+
<p>If a name is specified that refers to a submodule entry in a tree and the
957+
target object does not exist in the repository, then <code>cat-file</code> will ignore
958+
any custom format and print (with the object ID of the submodule):</p>
959+
</div>
960+
<div class="listingblock">
961+
<div class="content">
962+
<pre>&lt;oid&gt; SP submodule LF</pre>
963+
</div>
964+
</div>
965+
<div class="paragraph">
950966
<p>If <code>--follow-symlinks</code> is used, and a symlink in the repository points
951967
outside the repository, then <code>cat-file</code> will ignore any custom format
952968
and print:</p>
@@ -1041,7 +1057,7 @@ <h2 id="_git">GIT</h2>
10411057
</div>
10421058
<div id="footer">
10431059
<div id="footer-text">
1044-
Last updated 2025-05-27 15:29:51 -0700
1060+
Last updated 2025-06-18 14:54:41 -0700
10451061
</div>
10461062
</div>
10471063
</body>

0 commit comments

Comments
 (0)