diff mbox series

[1/2] docs: fix places that break compliation in MyFirstObjectWalk

Message ID 6c95f11f110be63dafa10dde5067b6e7eeff1a53.1635343531.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series fix up example code in MyFirstObjectWalk tutorial | expand

Commit Message

John Cai Oct. 27, 2021, 2:05 p.m. UTC
From: John Cai <johncai86@gmail.com>

Two errors in the example code caused compilation failures due to
a missing semi-colon 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 <johncai86@gmail.com>
---
 Documentation/MyFirstObjectWalk.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Eric Sunshine Oct. 27, 2021, 5:05 p.m. UTC | #1
On Wed, Oct 27, 2021 at 10:05 AM John Cai via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> docs: fix places that break compliation in MyFirstObjectWalk

s/compliation/compilation/

> Two errors in the example code caused compilation failures due to
> a missing semi-colon as well as initialization with an empty struct.
> This commit fixes that to make the MyFirstObjectWalk tutorial easier to
> follow.

s/semi-colon/semicolon/ would also be appropriate for the rest of the
project (but not terribly important in a commit message).

> Signed-off-by: John Cai <johncai86@gmail.com>

The patch itself makes perfect sense. Thanks.
diff mbox series

Patch

diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
index 45eb84d8b48..bf0a7c1f766 100644
--- a/Documentation/MyFirstObjectWalk.txt
+++ b/Documentation/MyFirstObjectWalk.txt
@@ -65,7 +65,7 @@  int cmd_walken(int argc, const char **argv, const char *prefix)
 	const char * const walken_usage[] = {
 		N_("git walken"),
 		NULL,
-	}
+	};
 	struct option options[] = {
 		OPT_END()
 	};
@@ -697,7 +697,7 @@  First, we'll need to `#include "list-objects-filter-options.h"` and set up the
 ----
 static void walken_object_walk(struct rev_info *rev)
 {
-	struct list_objects_filter_options filter_options = {};
+	struct list_objects_filter_options filter_options = { 0 };
 
 	...
 ----