git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: John Cai via GitGitGadget <gitgitgadget@gmail.com>
Cc: Git List <git@vger.kernel.org>, John Cai <johncai86@gmail.com>
Subject: Re: [PATCH 2/2] docs: add headers in MyFirstObjectWalk
Date: Wed, 27 Oct 2021 13:09:19 -0400	[thread overview]
Message-ID: <CAPig+cQxfJkV70sP8Ai3EQUrh3Y04WjkhjpG1zup7_gfg90jbg@mail.gmail.com> (raw)
In-Reply-To: <33cd9b2e8a675bf79132d312da8b7d8f4a2b84a3.1635343531.git.gitgitgadget@gmail.com>

On Wed, Oct 27, 2021 at 10:05 AM John Cai via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> 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 <johncai86@gmail.com>
> ---
> diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
> @@ -57,9 +57,14 @@ command). So we will send our debug output to `trace_printf()` instead. When
>  Add usage text and `-h` handling, like all subcommands should consistently do
> -(our test suite will notice and complain if you fail to do so).
> +(our test suite will notice and complain if you fail to do so). We'll need to include
> +the "parse-options.h" header.

Makes sense, but we should probably typeset these consistently with
backticks rather than double quotes...

> @@ -195,9 +200,13 @@ Similarly to the default values, we don't have anything to do here yet
> -Add a new function to `builtin/walken.c`:
> +Add a new function to `builtin/walken.c`. We'll also need to include the "config.h" header:

... just as `builtin/walken.c` is typeset with backticks (as are other
pathnames in this document).

> @@ -229,8 +238,14 @@ typically done by calling `repo_init_revisions()` with the repository you intend
> -Add the `struct rev_info` and the `repo_init_revisions()` call:
> +Add the `struct rev_info` and the `repo_init_revisions()` call. We'll also need to include
> +the "revision.h" header:

And so on through the remainder of the patch.

Thanks.

  reply	other threads:[~2021-10-27 17:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 14:05 [PATCH 0/2] fix up example code in MyFirstObjectWalk tutorial John Cai via GitGitGadget
2021-10-27 14:05 ` [PATCH 1/2] docs: fix places that break compliation in MyFirstObjectWalk John Cai via GitGitGadget
2021-10-27 17:05   ` Eric Sunshine
2021-10-27 14:05 ` [PATCH 2/2] docs: add headers " John Cai via GitGitGadget
2021-10-27 17:09   ` Eric Sunshine [this message]
2021-10-27 21:17   ` Junio C Hamano
2021-10-30  7:33   ` Bagas Sanjaya
2021-10-30  7:49     ` Eric Sunshine
2021-10-29 17:58 ` [PATCH v2 0/2] fix up example code in MyFirstObjectWalk tutorial John Cai via GitGitGadget
2021-10-29 17:58   ` [PATCH v2 1/2] docs: fix places that break compilation in MyFirstObjectWalk John Cai via GitGitGadget
2021-10-29 18:04     ` Eric Sunshine
2021-10-29 17:58   ` [PATCH v2 2/2] docs: add headers " John Cai via GitGitGadget
2021-10-29 19:52   ` [PATCH v3 0/2] fix up example code in MyFirstObjectWalk tutorial John Cai via GitGitGadget
2021-10-29 19:52     ` [PATCH v3 1/2] docs: fix places that break compilation in MyFirstObjectWalk John Cai via GitGitGadget
2021-10-29 19:52     ` [PATCH v3 2/2] docs: add headers " John Cai via GitGitGadget
2021-10-29 21:28     ` [PATCH v3 0/2] fix up example code in MyFirstObjectWalk tutorial Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cQxfJkV70sP8Ai3EQUrh3Y04WjkhjpG1zup7_gfg90jbg@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johncai86@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).