<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/MyFirstObjectWalk.txt, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-09-21T17:28:35Z</updated>
<entry>
<title>Documentation: clean up a few misspelled word typos</title>
<updated>2022-09-21T17:28:35Z</updated>
<author>
<name>Jacob Stopak</name>
<email>jacob@initialcommit.io</email>
</author>
<published>2022-09-20T02:45:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72991ff558585490aa4284c0b8ca1f13e86f0f18'/>
<id>urn:sha1:72991ff558585490aa4284c0b8ca1f13e86f0f18</id>
<content type='text'>
Used GNU "aspell check &lt;filename&gt;" to review various documentation
files with the default aspell dictionary. Ignored false-positives
between american and british english.

Signed-off-by: Jacob Stopak &lt;jacob@initialcommit.io&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>MyFirstObjectWalk: update recommended usage</title>
<updated>2022-03-09T18:25:27Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-03-09T16:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0d2f84919885d4dfb940e79a8e340bd2ad1887d'/>
<id>urn:sha1:f0d2f84919885d4dfb940e79a8e340bd2ad1887d</id>
<content type='text'>
The previous change consolidated traverse_commit_list() and
traverse_commit_list_filtered(). This allows us to simplify the
recommended usage in MyFirstObjectWalk.txt to use this new set of
values.

While here, add some clarification on the difference between the two
methods.

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: add headers in MyFirstObjectWalk</title>
<updated>2021-10-29T20:02:51Z</updated>
<author>
<name>John Cai</name>
<email>johncai86@gmail.com</email>
</author>
<published>2021-10-29T19:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d1b866778043115c0f707cceb8d16e14ac93817'/>
<id>urn:sha1:7d1b866778043115c0f707cceb8d16e14ac93817</id>
<content type='text'>
In several places, headers need to be included or else the code won't
compile. Since this is the first object walk, it would be nice to
include them in the tutorial to make it easier to follow.

Signed-off-by: John Cai &lt;johncai86@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: fix places that break compilation in MyFirstObjectWalk</title>
<updated>2021-10-29T20:02:45Z</updated>
<author>
<name>John Cai</name>
<email>johncai86@gmail.com</email>
</author>
<published>2021-10-29T19:52:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0ac30ec190284627f9bd3d0681823bcdc79dcf2'/>
<id>urn:sha1:f0ac30ec190284627f9bd3d0681823bcdc79dcf2</id>
<content type='text'>
Two errors in the example code caused compilation failures due to
a missing semicolon as well as initialization with an empty struct.
This commit fixes that to make the MyFirstObjectWalk tutorial easier to
follow.

Signed-off-by: John Cai &lt;johncai86@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'es/walken-tutorial-fix'</title>
<updated>2021-09-10T18:46:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-10T18:46:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4ceeef96221b026ea707416dff3480b3e3caf52'/>
<id>urn:sha1:b4ceeef96221b026ea707416dff3480b3e3caf52</id>
<content type='text'>
Typofix.

* es/walken-tutorial-fix:
  doc: fix syntax error and the format of printf
</content>
</entry>
<entry>
<title>doc: fix syntax error and the format of printf</title>
<updated>2021-08-30T16:30:32Z</updated>
<author>
<name>Zoker</name>
<email>kaixuanguiqu@gmail.com</email>
</author>
<published>2021-08-28T09:02:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=469888e6a5aabacb18e7c9422a8a8fa4d380fba3'/>
<id>urn:sha1:469888e6a5aabacb18e7c9422a8a8fa4d380fba3</id>
<content type='text'>
Fix syntax and correct the format of printf in MyFirstObjectWalk.txt

Signed-off-by: Zoker &lt;kaixuanguiqu@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>MyFirstObjectWalk: drop `init_walken_defaults()`</title>
<updated>2020-11-30T21:55:54Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2020-11-29T19:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bf97e12703d27ac1928f2551cc09bbf13597149'/>
<id>urn:sha1:3bf97e12703d27ac1928f2551cc09bbf13597149</id>
<content type='text'>
In a recent commit, we stopped calling `init_grep_defaults()` from this
function. Thus, by the end of the tutorial, we still haven't added any
contents to this function. Let's remove it for simplicity.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: use designated initializers for `grep_defaults`</title>
<updated>2020-11-21T22:50:33Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2020-11-21T18:31:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96313423a75fa8d88b6ecd5a15c21a7fbaf9e9be'/>
<id>urn:sha1:96313423a75fa8d88b6ecd5a15c21a7fbaf9e9be</id>
<content type='text'>
In 15fabd1bbd ("builtin/grep.c: make configuration callback more
reusable", 2012-10-09), we learned to fill a `static struct grep_opt
grep_defaults` which we can use as a blueprint for other such structs.

At the time, we didn't consider designated initializers to be widely
useable, but these days, we do. (See, e.g., cbc0f81d96 ("strbuf: use
designated initializers in STRBUF_INIT", 2017-07-10).)

Use designated initializers to let the compiler set up the struct and so
that we don't need to remember to call `init_grep_defaults()`.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: don't set up a "default" repo for grep</title>
<updated>2020-11-21T22:50:29Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2020-11-21T18:31:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d3878799f8260968ea9f6a75a92c4daca1da133'/>
<id>urn:sha1:1d3878799f8260968ea9f6a75a92c4daca1da133</id>
<content type='text'>
`init_grep_defaults()` fills a `static struct grep_opt grep_defaults`.
This struct is then used by `grep_init()` as a blueprint for other such
structs. Notably, `grep_init()` takes a `struct repo *` and assigns it
into the target struct.

As a result, it is unnecessary for us to take a `struct repo *` in
`init_grep_defaults()` as well. We assign it into the default struct and
never look at it again. And in light of how we return early if we have
already set up the default struct, it's not just unnecessary, but is
also a bit confusing: If we are called twice and with different repos,
is it a bug or a feature that we ignore the second repo?

Drop the repo parameter for `init_grep_defaults()`.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>MyFirstObjectWalk: remove unnecessary conditional statement</title>
<updated>2020-03-30T18:16:41Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-03-28T15:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3f53ce5bddc9bc58de32ec435a8695000ad9fe6'/>
<id>urn:sha1:e3f53ce5bddc9bc58de32ec435a8695000ad9fe6</id>
<content type='text'>
In the given example, `commit` cannot be `NULL` (because this is the
loop condition: if it was `NULL`, the loop body would not be entered at
all). It took this developer a moment or two to see that this is
therefore dead code.

Let's remove it, to avoid puzzling future readers.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Reviewed-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
