Include gettext.h in MyFirstContribution tutorial
The tutorial in Documentation/MyFirstContribution.txt has steps to print some text using the "_" function. However, this leads to compiler errors when running "make" since "gettext.h" is not #included. Update docs with a note to #include "gettext.h" in "builtin/psuh.c". Signed-off-by: Jacob Stopak <jacob@initialcommit.io> Reviewed-by: Emily Shaffer <nasamuffin@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jacob Stopak committed
Oct 16, 2023 at 21:15 UTC
6b79a2183c85749996f561d0f27bd0dc799aaae9
1 file changed
+4
-3
Documentation/MyFirstContribution.txt
+4
-3
@@ -160,10 +160,11 @@ in order to keep the declarations alphabetically sorted:
160
int cmd_psuh(int argc, const char **argv, const char *prefix);
161
----
162
163
-Be sure to `#include "builtin.h"` in your `psuh.c`.
163
+Be sure to `#include "builtin.h"` in your `psuh.c`. You'll also need to
164
+`#include "gettext.h"` to use functions related to printing output text.
165
165
-Go ahead and add some throwaway printf to that function. This is a decent
166
-starting point as we can now add build rules and register the command.
166
+Go ahead and add some throwaway printf to the `cmd_psuh` function. This is a
167
+decent starting point as we can now add build rules and register the command.
168
169
NOTE: Your throwaway text, as well as much of the text you will be adding over
170
the course of this tutorial, is user-facing. That means it needs to be