All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emily Shaffer <emilyshaffer@google.com>
To: Josh Steadmon <steadmon@google.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v4] documentation: add tutorial for first contribution
Date: Wed, 1 May 2019 17:57:57 -0700	[thread overview]
Message-ID: <20190502005757.GB99569@google.com> (raw)
In-Reply-To: <20190430185923.GA26779@google.com>

On Tue, Apr 30, 2019 at 11:59:23AM -0700, Josh Steadmon wrote:
> Just a couple typo fixes listed below:
> 

Thanks for the review, Josh.

I'll hold these fixes locally until I either get something more
significant to fix or Junio asks for them before a merge to next, to
reduce spam to the list.

- Emily
> 
> On 2019.04.23 12:34, Emily Shaffer wrote:
> [snip]
> > +=== Implementation
> > +
> > +It's probably useful to do at least something besides printing out a string.
> > +Let's start by having a look at everything we get.
> > +
> > +Modify your `cmd_psuh` implementation to dump the args you're passed:
> > +
> > +----
> > +	int i;
> > +
> > +	...
> > +
> > +	printf(Q_("Your args (there is %d):\n",
> > +		  "Your args (there are %d):\n",
> > +		  argc),
> > +	       argc);
> > +	for (i = 0; i < argc; i++) {
> > +		printf("%d: %s\n", i, argv[i]);
> > +	}
> > +	printf(_("Your current working directory:\n<top-level>%s%s\n"),
> > +	       prefix ? "/" : "", prefix ? prefix : "");
> > +
> > +----
> > +
> > +Build and try it. As you may expect, there's pretty much just whatever we give
> > +on the command line, including the name of our command. (If `prefix` is empty
> > +for you, try `cd Documentation/ && ../bin-wrappers/git/ psuh`). That's not so
> 
> Looks like you have an errant "/" after "git".

Right you are. Thanks.
> 
> 
> [snip]
> > +=== Adding documentation
> > +
> > +Awesome! You've got a fantastic new command that you're ready to share with the
> > +community. But hang on just a minute - this isn't very user-friendly. Run the
> > +following:
> > +
> > +----
> > +$ ./bin-wrappers/git help psuh
> > +----
> > +
> > +Your new command is undocumented! Let's fix that.
> > +
> > +Take a look at `Documentation/git-*.txt`. These are the manpages for the
> > +subcommands that Git knows about. You can open these up and take a look to get
> > +acquainted with the format, but then go ahead and make a new file
> > +`Documentation/git-psuh.txt`. Like with most of the documentation in the Git
> > +project, help pages are written with AsciiDoc (see CodingGuidelines, "Writing
> > +Documentation" section). Use the following template to fill out your own
> > +manpage:
> > +
> > +// Surprisingly difficult to embed AsciiDoc source within AsciiDoc.
> > +[listing]
> > +....
> > +git-psuh(1)
> > +===========
> > +
> > +NAME
> > +----
> > +git-psuh - Delight users' typo with a shy horse
> > +
> > +
> > +SYNOPSIS
> > +--------
> > +[verse]
> > +'git-psuh'
> > +
> > +DESCRIPTION
> > +-----------
> > +...
> > +
> > +OPTIONS[[OPTIONS]]
> > +------------------
> > +...
> > +
> > +OUTPUT
> > +------
> > +...
> > +
> > +
> > +GIT
> > +---
> > +Part of the linkgit:git[1] suite
> > +....
> > +
> > +The most important pieces of this to note are the file header, underlined by =,
> > +the NAME section, and the SYNOPSIS, which would normally contain the grammar if
> > +your command took arguments. Try to use well-established manpage headers so your
> > +documentation is consistent with other Git and UNIX manpages; this makes life
> > +easier for your user, who can skip to the section they know contains the
> > +information they need.
> > +
> > +Now that you've written your manpage, you'll need to build it explicitly. We
> > +convert your AsciiDoc to troff which is man-readable like so:
> > +
> > +----
> > +$ make all doc
> > +$ man Documentation/git-psuh.1
> > +----
> > +
> > +or
> > +
> > +----
> > +$ make -C Documentation/git-psuh.1
> 
> Needs a space after "Documentation/".

Done. Thanks much.

  reply	other threads:[~2019-05-02  0:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 18:32 [PATCH 0/1] documentation: add lab for first contribution Emily Shaffer via GitGitGadget
2019-04-11 18:32 ` [PATCH 1/1] " Emily Shaffer via GitGitGadget
2019-04-12  3:20   ` Junio C Hamano
2019-04-12 22:03     ` Emily Shaffer
2019-04-13  5:39       ` Junio C Hamano
2019-04-15 17:26         ` Emily Shaffer
2019-04-11 21:03 ` [PATCH 0/1] " Josh Steadmon
2019-04-12  2:35 ` Junio C Hamano
2019-04-12 22:58   ` Emily Shaffer
2019-04-16 20:26 ` [PATCH v2 " Emily Shaffer via GitGitGadget
2019-04-16 20:26   ` [PATCH v2 1/1] " Emily Shaffer via GitGitGadget
2019-04-17  5:32     ` Junio C Hamano
2019-04-17  8:07       ` Eric Sunshine
2019-04-18  0:05         ` Junio C Hamano
2019-04-17 23:16       ` Emily Shaffer
2019-04-16 21:13   ` [PATCH v2 0/1] " Emily Shaffer
2019-04-19 16:57   ` [PATCH v3] " Emily Shaffer
2019-04-21 10:52     ` Junio C Hamano
2019-04-22 22:27       ` Emily Shaffer
2019-04-23 19:34     ` [PATCH v4] documentation: add tutorial " Emily Shaffer
2019-04-30 18:59       ` Josh Steadmon
2019-05-02  0:57         ` Emily Shaffer [this message]
2019-05-03  2:11       ` Phil Hord
2019-05-07 19:05         ` Emily Shaffer
2019-05-06 22:28       ` Jonathan Tan
2019-05-07 19:59         ` Emily Shaffer
2019-05-07 20:32           ` Jonathan Tan
2019-05-08  2:45         ` Junio C Hamano
2019-05-07 21:30       ` [PATCH v5 0/2] documentation: add lab " Emily Shaffer
2019-05-07 21:30         ` [PATCH v5 1/2] documentation: add tutorial " Emily Shaffer
2019-05-07 23:25           ` Emily Shaffer
2019-05-08  3:46           ` Junio C Hamano
2019-05-08 18:58             ` Emily Shaffer
2019-05-08 19:53               ` Jonathan Tan
2019-05-07 21:30         ` [PATCH v5 2/2] documentation: add anchors to MyFirstContribution Emily Shaffer
2019-05-08  3:30         ` [PATCH v5 0/2] documentation: add lab for first contribution Junio C Hamano
2019-05-17 19:03         ` [PATCH v6 0/2] documentation: add tutorial " Emily Shaffer
2019-05-17 19:07           ` [PATCH v6 1/2] " Emily Shaffer
2019-05-26  7:48             ` Christian Couder
2019-05-29 20:09               ` Emily Shaffer
2019-10-18 16:40             ` SZEDER Gábor
2019-10-18 22:54               ` Emily Shaffer
2019-05-17 19:07           ` [PATCH v6 2/2] documentation: add anchors to MyFirstContribution Emily Shaffer
2019-05-29 20:18           ` [PATCH] doc: add some nit fixes " Emily Shaffer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190502005757.GB99569@google.com \
    --to=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=steadmon@google.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.