aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/MyFirstObjectWalk.txt
diff options
context:
space:
mode:
authorJohn Cai <johncai86@gmail.com>2021-10-29 19:52:42 +0000
committerJunio C Hamano <gitster@pobox.com>2021-10-29 13:02:45 -0700
commitf0ac30ec190284627f9bd3d0681823bcdc79dcf2 (patch)
tree4e5c51feacef18605b643c006ce2ef867bca3fd6 /Documentation/MyFirstObjectWalk.txt
parente9e5ba39a78c8f5057262d49e261b42a8660d5b9 (diff)
downloadgit-f0ac30ec190284627f9bd3d0681823bcdc79dcf2.tar.gz
docs: fix places that break compilation in MyFirstObjectWalk
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/MyFirstObjectWalk.txt')
-rw-r--r--Documentation/MyFirstObjectWalk.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
index 45eb84d8b4..bf0a7c1f76 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 };
...
----