]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Include gettext.h in MyFirstContribution tutorial
authorJacob Stopak <jacob@initialcommit.io>
Tue, 17 Oct 2023 04:15:03 +0000 (21:15 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 28 Oct 2023 00:02:06 +0000 (09:02 +0900)
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>
Documentation/MyFirstContribution.txt

index 62d11a5cd7f909e2e038e1f768bafddc82be210d..7cfed60c2e984f4fa29aca68983c2260faf451ee 100644 (file)
@@ -160,10 +160,11 @@ in order to keep the declarations alphabetically sorted:
 int cmd_psuh(int argc, const char **argv, const char *prefix);
 ----
 
-Be sure to `#include "builtin.h"` in your `psuh.c`.
+Be sure to `#include "builtin.h"` in your `psuh.c`. You'll also need to
+`#include "gettext.h"` to use functions related to printing output text.
 
-Go ahead and add some throwaway printf to that function. This is a decent
-starting point as we can now add build rules and register the command.
+Go ahead and add some throwaway printf to the `cmd_psuh` function. This is a
+decent starting point as we can now add build rules and register the command.
 
 NOTE: Your throwaway text, as well as much of the text you will be adding over
 the course of this tutorial, is user-facing. That means it needs to be