Skip to content

Commit eabec52

Browse files
committed
Autogenerated HTML docs for v2.44.0-548-g91ec36
1 parent fd00376 commit eabec52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+484
-396
lines changed

MyFirstContribution.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
<body class="article">
736736
<div id="header">
737737
<h1>My First Contribution to the Git Project</h1>
738-
<span id="revdate">2024-04-05</span>
738+
<span id="revdate">2024-04-09</span>
739739
</div>
740740
<div id="content">
741741
<div class="sect1">

MyFirstObjectWalk.html

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
<body class="article">
736736
<div id="header">
737737
<h1>My First Object Walk</h1>
738-
<span id="revdate">2024-04-05</span>
738+
<span id="revdate">2024-04-09</span>
739739
</div>
740740
<div id="content">
741741
<div class="sect1">
@@ -989,13 +989,14 @@ <h4 id="_configuring_from_code_gitconfig_code">Configuring From <code>.gitconfig
989989

990990
...
991991

992-
static int git_walken_config(const char *var, const char *value, void *cb)
992+
static int git_walken_config(const char *var, const char *value,
993+
const struct config_context *ctx, void *cb)
993994
{
994995
/*
995996
* For now, we don't have any custom configuration, so fall back to
996997
* the default config.
997998
*/
998-
return git_default_config(var, value, cb);
999+
return git_default_config(var, value, ctx, cb);
9991000
}</code></pre>
10001001
</div></div>
10011002
<div class="paragraph"><p>Make sure to invoke <code>git_config()</code> with it in your <code>cmd_walken()</code>:</p></div>
@@ -1180,10 +1181,11 @@ <h3 id="_adding_a_filter">Adding a Filter</h3>
11801181
<div class="paragraph"><p>First some setup. Add <code>grep_config()</code> to <code>git_walken_config()</code>:</p></div>
11811182
<div class="listingblock">
11821183
<div class="content">
1183-
<pre><code>static int git_walken_config(const char *var, const char *value, void *cb)
1184+
<pre><code>static int git_walken_config(const char *var, const char *value,
1185+
const struct config_context *ctx, void *cb)
11841186
{
1185-
grep_config(var, value, cb);
1186-
return git_default_config(var, value, cb);
1187+
grep_config(var, value, ctx, cb);
1188+
return git_default_config(var, value, ctx, cb);
11871189
}</code></pre>
11881190
</div></div>
11891191
<div class="paragraph"><p>Next, we can modify the <code>grep_filter</code>. This is done with convenience functions
@@ -1317,7 +1319,7 @@ <h2 id="_basic_object_walk">Basic Object Walk</h2>
13171319
about each one.</p></div>
13181320
<div class="paragraph"><p>We can base our work on an example. <code>git pack-objects</code> prepares all kinds of
13191321
objects for packing into a bitmap or packfile. The work we are interested in
1320-
resides in <code>builtins/pack-objects.c:get_object_list()</code>; examination of that
1322+
resides in <code>builtin/pack-objects.c:get_object_list()</code>; examination of that
13211323
function shows that the all-object walk is being performed by
13221324
<code>traverse_commit_list()</code> or <code>traverse_commit_list_filtered()</code>. Those two
13231325
functions reside in <code>list-objects.c</code>; examining the source shows that, despite
@@ -1549,8 +1551,8 @@ <h3 id="_adding_a_filter_2">Adding a Filter</h3>
15491551
} else {
15501552
trace_printf(
15511553
_("Filtered object walk with filterspec 'tree:1'.\n"));
1552-
CALLOC_ARRAY(rev-&gt;filter, 1);
1553-
parse_list_objects_filter(rev-&gt;filter, "tree:1");
1554+
1555+
parse_list_objects_filter(&amp;rev-&gt;filter, "tree:1");
15541556
}
15551557
traverse_commit_list(rev, walken_show_commit,
15561558
walken_show_object, NULL);</code></pre>
@@ -1567,10 +1569,12 @@ <h3 id="_adding_a_filter_2">Adding a Filter</h3>
15671569
<div class="sect2">
15681570
<h3 id="_counting_omitted_objects">Counting Omitted Objects</h3>
15691571
<div class="paragraph"><p>We also have the capability to enumerate all objects which were omitted by a
1570-
filter, like with <code>git log --filter=&lt;spec&gt; --filter-print-omitted</code>. Asking
1571-
<code>traverse_commit_list_filtered()</code> to populate the <code>omitted</code> list means that our
1572-
object walk does not perform any better than an unfiltered object walk; all
1573-
reachable objects are walked in order to populate the list.</p></div>
1572+
filter, like with <code>git log --filter=&lt;spec&gt; --filter-print-omitted</code>. To do this,
1573+
change <code>traverse_commit_list()</code> to <code>traverse_commit_list_filtered()</code>, which is
1574+
able to populate an <code>omitted</code> list. Asking for this list of filtered objects
1575+
may cause performance degradations, however, because in this case, despite
1576+
filtering objects, the possibly much larger set of all reachable objects must
1577+
be processed in order to populate that list.</p></div>
15741578
<div class="paragraph"><p>First, add the <code>struct oidset</code> and related items we will use to iterate it:</p></div>
15751579
<div class="listingblock">
15761580
<div class="content">
@@ -1589,8 +1593,9 @@ <h3 id="_counting_omitted_objects">Counting Omitted Objects</h3>
15891593

15901594
...</code></pre>
15911595
</div></div>
1592-
<div class="paragraph"><p>Modify the call to <code>traverse_commit_list_filtered()</code> to include your <code>omitted</code>
1593-
object:</p></div>
1596+
<div class="paragraph"><p>Replace the call to <code>traverse_commit_list()</code> with
1597+
<code>traverse_commit_list_filtered()</code> and pass a pointer to the <code>omitted</code> oidset
1598+
defined and initialized above:</p></div>
15941599
<div class="listingblock">
15951600
<div class="content">
15961601
<pre><code> ...
@@ -1658,7 +1663,7 @@ <h3 id="_changing_the_order_2">Changing the Order</h3>
16581663
<div class="paragraph"><p>With only that change, run again (but save yourself some scrollback):</p></div>
16591664
<div class="listingblock">
16601665
<div class="content">
1661-
<pre><code>$ GIT_TRACE=1 ./bin-wrappers/git walken | head -n 10</code></pre>
1666+
<pre><code>$ GIT_TRACE=1 ./bin-wrappers/git walken 2&gt;&amp;1 | head -n 10</code></pre>
16621667
</div></div>
16631668
<div class="paragraph"><p>Take a look at the top commit with <code>git show</code> and the object ID you printed; it
16641669
should be the same as the output of <code>git show HEAD</code>.</p></div>
@@ -1683,7 +1688,7 @@ <h3 id="_changing_the_order_2">Changing the Order</h3>
16831688
<div class="listingblock">
16841689
<div class="content">
16851690
<pre><code>$ make
1686-
$ GIT_TRACE=1 ./bin-wrappers git walken | tail -n 10</code></pre>
1691+
$ GIT_TRACE=1 ./bin-wrappers/git walken 2&gt;&amp;1 | tail -n 10</code></pre>
16871692
</div></div>
16881693
<div class="paragraph"><p>The last commit object given should have the same OID as the one we saw at the
16891694
top before, and running <code>git show &lt;oid&gt;</code> with that OID should give you again
@@ -1737,7 +1742,7 @@ <h2 id="_wrapping_up">Wrapping Up</h2>
17371742
<div id="footer">
17381743
<div id="footer-text">
17391744
Last updated
1740-
2023-07-17 11:51:48 PDT
1745+
2024-04-09 14:45:01 PDT
17411746
</div>
17421747
</div>
17431748
</body>

MyFirstObjectWalk.txt

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,14 @@ We'll also need to include the `config.h` header:
210210

211211
...
212212

213-
static int git_walken_config(const char *var, const char *value, void *cb)
213+
static int git_walken_config(const char *var, const char *value,
214+
const struct config_context *ctx, void *cb)
214215
{
215216
/*
216217
* For now, we don't have any custom configuration, so fall back to
217218
* the default config.
218219
*/
219-
return git_default_config(var, value, cb);
220+
return git_default_config(var, value, ctx, cb);
220221
}
221222
----
222223

@@ -389,10 +390,11 @@ modifying `rev_info.grep_filter`, which is a `struct grep_opt`.
389390
First some setup. Add `grep_config()` to `git_walken_config()`:
390391

391392
----
392-
static int git_walken_config(const char *var, const char *value, void *cb)
393+
static int git_walken_config(const char *var, const char *value,
394+
const struct config_context *ctx, void *cb)
393395
{
394-
grep_config(var, value, cb);
395-
return git_default_config(var, value, cb);
396+
grep_config(var, value, ctx, cb);
397+
return git_default_config(var, value, ctx, cb);
396398
}
397399
----
398400

@@ -523,7 +525,7 @@ about each one.
523525

524526
We can base our work on an example. `git pack-objects` prepares all kinds of
525527
objects for packing into a bitmap or packfile. The work we are interested in
526-
resides in `builtins/pack-objects.c:get_object_list()`; examination of that
528+
resides in `builtin/pack-objects.c:get_object_list()`; examination of that
527529
function shows that the all-object walk is being performed by
528530
`traverse_commit_list()` or `traverse_commit_list_filtered()`. Those two
529531
functions reside in `list-objects.c`; examining the source shows that, despite
@@ -732,8 +734,8 @@ walk we've just performed:
732734
} else {
733735
trace_printf(
734736
_("Filtered object walk with filterspec 'tree:1'.\n"));
735-
CALLOC_ARRAY(rev->filter, 1);
736-
parse_list_objects_filter(rev->filter, "tree:1");
737+
738+
parse_list_objects_filter(&rev->filter, "tree:1");
737739
}
738740
traverse_commit_list(rev, walken_show_commit,
739741
walken_show_object, NULL);
@@ -752,10 +754,12 @@ points to the same tree object as its grandparent.)
752754
=== Counting Omitted Objects
753755

754756
We also have the capability to enumerate all objects which were omitted by a
755-
filter, like with `git log --filter=<spec> --filter-print-omitted`. Asking
756-
`traverse_commit_list_filtered()` to populate the `omitted` list means that our
757-
object walk does not perform any better than an unfiltered object walk; all
758-
reachable objects are walked in order to populate the list.
757+
filter, like with `git log --filter=<spec> --filter-print-omitted`. To do this,
758+
change `traverse_commit_list()` to `traverse_commit_list_filtered()`, which is
759+
able to populate an `omitted` list. Asking for this list of filtered objects
760+
may cause performance degradations, however, because in this case, despite
761+
filtering objects, the possibly much larger set of all reachable objects must
762+
be processed in order to populate that list.
759763

760764
First, add the `struct oidset` and related items we will use to iterate it:
761765

@@ -776,8 +780,9 @@ static void walken_object_walk(
776780
...
777781
----
778782

779-
Modify the call to `traverse_commit_list_filtered()` to include your `omitted`
780-
object:
783+
Replace the call to `traverse_commit_list()` with
784+
`traverse_commit_list_filtered()` and pass a pointer to the `omitted` oidset
785+
defined and initialized above:
781786

782787
----
783788
...
@@ -843,7 +848,7 @@ those lines without having to recompile.
843848
With only that change, run again (but save yourself some scrollback):
844849

845850
----
846-
$ GIT_TRACE=1 ./bin-wrappers/git walken | head -n 10
851+
$ GIT_TRACE=1 ./bin-wrappers/git walken 2>&1 | head -n 10
847852
----
848853

849854
Take a look at the top commit with `git show` and the object ID you printed; it
@@ -871,7 +876,7 @@ of the first handful:
871876

872877
----
873878
$ make
874-
$ GIT_TRACE=1 ./bin-wrappers git walken | tail -n 10
879+
$ GIT_TRACE=1 ./bin-wrappers/git walken 2>&1 | tail -n 10
875880
----
876881

877882
The last commit object given should have the same OID as the one we saw at the

RelNotes/2.45.0.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ UI, Workflows & Features
7373
* core.commentChar used to be limited to a single byte, but has been
7474
updated to allow an arbitrary multi-byte sequence.
7575

76+
* "git add -p" and other "interactive hunk selection" UI has learned to
77+
skip showing the hunk immediately after it has already been shown, and
78+
an additional action to explicitly ask to reshow the current hunk.
79+
80+
* "git pack-refs" learned the "--auto" option, which is a useful
81+
addition to be triggered from "git gc --auto".
7682

7783
Performance, Internal Implementation, Development Support etc.
7884

@@ -140,6 +146,16 @@ Performance, Internal Implementation, Development Support etc.
140146
the "t/" directory with "make t<num>-*.sh t<num>-*.sh".
141147
(merge 8d383806fc pb/test-scripts-are-build-targets later to maint).
142148

149+
* The "hint:" messages given by the advice mechanism, when given a
150+
message with a blank line, left a line with trailing whitespace,
151+
which has been cleansed.
152+
153+
* Documentation rules has been explicitly described how to mark-up
154+
literal parts and a few manual pages have been updated as examples.
155+
156+
* The .editorconfig file has been taught that a Makefile uses HT
157+
indentation.
158+
143159

144160
Fixes since v2.44
145161
-----------------
@@ -302,6 +318,23 @@ Fixes since v2.44
302318
corrected.
303319
(merge f999d5188b bl/pretty-shorthand-config-fix later to maint).
304320

321+
* "git apply" failed to extract the filename the patch applied to,
322+
when the change was about an empty file created in or deleted from
323+
a directory whose name ends with a SP, which has been corrected.
324+
(merge 776ffd1a30 jc/apply-parse-diff-git-header-names-fix later to maint).
325+
326+
* Update a more recent tutorial doc.
327+
(merge 95ab557b4b dg/myfirstobjectwalk-updates later to maint).
328+
329+
* The test script had an incomplete and ineffective attempt to avoid
330+
clobbering the testing user's real crontab (and its equivalents),
331+
which has been completed.
332+
(merge 73cb87773b es/test-cron-safety later to maint).
333+
334+
* Use advice_if_enabled() API to rewrite a simple pattern to
335+
call advise() after checking advice_enabled().
336+
(merge 6412d01527 rj/use-adv-if-enabled later to maint).
337+
305338
* Other code cleanup, docfix, build fix, etc.
306339
(merge f0e578c69c rs/use-xstrncmpz later to maint).
307340
(merge 83e6eb7d7a ba/credential-test-clean-fix later to maint).

ReviewingGuidelines.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
<body class="article">
736736
<div id="header">
737737
<h1>Reviewing Patches in the Git Project</h1>
738-
<span id="revdate">2024-04-05</span>
738+
<span id="revdate">2024-04-09</span>
739739
</div>
740740
<div id="content">
741741
<div class="sect1">

SubmittingPatches.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
<body class="article">
736736
<div id="header">
737737
<h1>Submitting Patches</h1>
738-
<span id="revdate">2024-04-05</span>
738+
<span id="revdate">2024-04-09</span>
739739
</div>
740740
<div id="content">
741741
<div class="sect1">

ToolsForGit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
<body class="article">
736736
<div id="header">
737737
<h1>Tools for developing Git</h1>
738-
<span id="revdate">2024-04-05</span>
738+
<span id="revdate">2024-04-09</span>
739739
</div>
740740
<div id="content">
741741
<div class="sect1">

everyday.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
<body class="article">
736736
<div id="header">
737737
<h1>Everyday Git With 20 Commands Or So</h1>
738-
<span id="revdate">2024-04-05</span>
738+
<span id="revdate">2024-04-09</span>
739739
</div>
740740
<div id="content">
741741
<div id="preamble">

git-add.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,7 @@ <h2 id="_interactive_mode">INTERACTIVE MODE</h2>
12361236
K - leave this hunk undecided, see previous hunk
12371237
s - split the current hunk into smaller hunks
12381238
e - manually edit the current hunk
1239+
p - print the current hunk
12391240
? - print help</code></pre>
12401241
</div></div>
12411242
<div class="paragraph"><p>After deciding the fate for all hunks, if there is any hunk
@@ -1425,7 +1426,7 @@ <h2 id="_git">GIT</h2>
14251426
<div id="footer">
14261427
<div id="footer-text">
14271428
Last updated
1428-
2024-03-01 17:30:58 PST
1429+
2024-04-09 14:45:01 PDT
14291430
</div>
14301431
</div>
14311432
</body>

git-add.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ patch::
348348
K - leave this hunk undecided, see previous hunk
349349
s - split the current hunk into smaller hunks
350350
e - manually edit the current hunk
351+
p - print the current hunk
351352
? - print help
352353
+
353354
After deciding the fate for all hunks, if there is any hunk

0 commit comments

Comments
 (0)