git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Include gettext.h in MyFirstContribution tutorial
@ 2023-10-17  4:15 Jacob Stopak
  2023-10-18 21:35 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Stopak @ 2023-10-17  4:15 UTC (permalink / raw)
  To: git; +Cc: Jacob Stopak

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>
---
 Documentation/MyFirstContribution.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
index 62d11a5cd7..7cfed60c2e 100644
--- a/Documentation/MyFirstContribution.txt
+++ b/Documentation/MyFirstContribution.txt
@@ -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
-- 
2.42.0.398.ga9ecda2788.dirty


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Include gettext.h in MyFirstContribution tutorial
  2023-10-17  4:15 [PATCH] Include gettext.h in MyFirstContribution tutorial Jacob Stopak
@ 2023-10-18 21:35 ` Junio C Hamano
  2023-10-26 21:21   ` Emily Shaffer
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2023-10-18 21:35 UTC (permalink / raw)
  To: git, Emily Shaffer; +Cc: Jacob Stopak

Jacob Stopak <jacob@initialcommit.io> writes:

> 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>
> ---
>  Documentation/MyFirstContribution.txt | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Who's the first responder on this document these days?  I think the
"psuh" was Emily's invention, so sending it in her direction.

Thanks.

> diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
> index 62d11a5cd7..7cfed60c2e 100644
> --- a/Documentation/MyFirstContribution.txt
> +++ b/Documentation/MyFirstContribution.txt
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Include gettext.h in MyFirstContribution tutorial
  2023-10-18 21:35 ` Junio C Hamano
@ 2023-10-26 21:21   ` Emily Shaffer
  0 siblings, 0 replies; 3+ messages in thread
From: Emily Shaffer @ 2023-10-26 21:21 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jacob Stopak

On Wed, Oct 18, 2023 at 02:35:17PM -0700, Junio C Hamano wrote:
> 
> Jacob Stopak <jacob@initialcommit.io> writes:
> 
> > 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>
> > ---
> >  Documentation/MyFirstContribution.txt | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> Who's the first responder on this document these days?  I think the
> "psuh" was Emily's invention, so sending it in her direction.
> 
> Thanks.

Thanks for the nudge and sorry for the slow response (and thanks to Jack
for pointing out to me that I was delinquent).

I like this change. Nice touch disambiguating "function" in the
following paragraph.

Reviewed-by: Emily Shaffer <nasamuffin@google.com>

> 
> > diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
> > index 62d11a5cd7..7cfed60c2e 100644
> > --- a/Documentation/MyFirstContribution.txt
> > +++ b/Documentation/MyFirstContribution.txt
> > @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-26 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17  4:15 [PATCH] Include gettext.h in MyFirstContribution tutorial Jacob Stopak
2023-10-18 21:35 ` Junio C Hamano
2023-10-26 21:21   ` Emily Shaffer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).