git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 1/2] docs: fix places that break compilation in MyFirstObjectWalk

From
John Cai via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 29, 2021, 19:52 UTC
Message-ID
<f9481c77e2d42038196a587b4a637f4277f0dda7.1635537163.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1063.v3.git.1635537163.gitgitgadget@gmail.com>
From: John Cai <johncai86@gmail.com>

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 <johncai86@gmail.com>
---
 Documentation/MyFirstObjectWalk.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
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 };
 
 	...
 ----
-- 
gitgitgadget
Previous: John Cai via GitGitGadgetNext: John Cai via GitGitGadget
Message 14 of 16 in “fix up example code in MyFirstObjectWalk tutorial”
  1. 0/2 fix up example code in MyFirstObjectWalk tutorialJohn Cai via GitGitGadget, Oct 27, 2021
  2. 1/2 docs: fix places that break compliation in MyFirstObjectWalkJohn Cai via GitGitGadget, Oct 27, 2021
  3. Eric SunshineOct 27, 2021
  4. 2/2 docs: add headers in MyFirstObjectWalkJohn Cai via GitGitGadget, Oct 27, 2021
  5. Eric SunshineOct 27, 2021
  6. Junio C HamanoOct 27, 2021
  7. Bagas SanjayaOct 30, 2021
  8. Eric SunshineOct 30, 2021
  9. 0/2 fix up example code in MyFirstObjectWalk tutorialJohn Cai via GitGitGadget, Oct 29, 2021
  10. 1/2 docs: fix places that break compilation in MyFirstObjectWalkJohn Cai via GitGitGadget, Oct 29, 2021
  11. Eric SunshineOct 29, 2021
  12. 2/2 docs: add headers in MyFirstObjectWalkJohn Cai via GitGitGadget, Oct 29, 2021
  13. 0/2 fix up example code in MyFirstObjectWalk tutorialJohn Cai via GitGitGadget, Oct 29, 2021
  14. 1/2 docs: fix places that break compilation in MyFirstObjectWalkJohn Cai via GitGitGadget, Oct 29, 2021
  15. 2/2 docs: add headers in MyFirstObjectWalkJohn Cai via GitGitGadget, Oct 29, 2021
  16. Eric SunshineOct 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.