From: Emily Shaffer <emilyshaffer@google.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: git <git@vger.kernel.org>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Jonathan Tan <jonathantanmy@google.com>
Subject: Re: [PATCH v6 1/2] documentation: add tutorial for first contribution
Date: Wed, 29 May 2019 13:09:44 -0700 [thread overview]
Message-ID: <20190529200944.GA52337@google.com> (raw)
In-Reply-To: <CAP8UFD2YH50Br4BNmTqEVeUknxi1X39JCRB4XMwK8rx3DWx=KA@mail.gmail.com>
On Sun, May 26, 2019 at 09:48:26AM +0200, Christian Couder wrote:
> On Fri, May 17, 2019 at 11:48 PM Emily Shaffer <emilyshaffer@google.com> wrote:
> >
> > This tutorial covers how to add a new command to Git and, in the
> > process, everything from cloning git/git to getting reviewed on the
> > mailing list. It's meant for new contributors to go through
> > interactively, learning the techniques generally used by the git/git
> > development community.
>
> Very nice, thanks! I tried it and I liked it very much.
>
> I noted a few nits that might help improve it a bit.
>
> > +----
> > +$ git clone https://github.com/git/git git
>
> Nit: maybe add "$ cd git" after that.
Sure, done.
>
> > +Check it out! You've got a command! Nice work! Let's commit this.
> > +
> > +----
> > +$ git add Makefile builtin.h builtin/psuh.c git.c
> > +$ git commit -s
> > +----
>
> Nit: when building a "git-psuh" binary is created at the root of the
> repo which will pollute the `git status` output. The usual way we deal
> with that is by adding "/git-psuh" to the ".gitignore" at the root of
> the repo.
Right you are - good catch. I'll add a paragraph about adding to the
gitignore.
>
> > +=== 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:
>
> Nit: maybe it could be a bit more clear that the previous printf()
> call should be kept as is, otherwise the test added later will fail.
Done.
>
> > +----
> > + const char *cfg_name;
> > +
> > +...
> > +
> > + git_config(git_default_config, NULL)
>
> Nit: a ";" is missing at the end of the above line.
Yikes, done.
>
> > +Let's commit this as well.
> > +
> > +----
> > +$ git commit -sm "psuh: print the current branch"
>
> Nit: maybe add "builtin/psuh.c" at the end of the above line, so that
> a `git add builtin/psuh.c` is not needed.
This is purely personal preference, but I prefer manually adding files
first. I didn't add any indication about staging the changes to psuh.c
though, so I'm adding a line to `git add builtin/psuh.c`. I found one
other place where the commit line was shown without the add line, so I
included the add there too.
>
> > +....
> > +git-psuh(1)
> > +===========
> > +
> > +NAME
> > +----
> > +git-psuh - Delight users' typo with a shy horse
> > +
> > +
> > +SYNOPSIS
> > +--------
> > +[verse]
> > +'git-psuh'
> > +
> > +DESCRIPTION
> > +-----------
> > +...
> > +
> > +OPTIONS[[OPTIONS]]
> > +------------------
> > +...
> > +
> > +OUTPUT
> > +------
> > +...
> > +
> > +
>
> Nit: it seems that the above newline could be removed.
Sure, why not.
>
> Thanks,
> Christian.
Thanks for trying it out and for your thorough review, Christian. I
appreciate it! Since this is checked into next already, I'll be sending
a follow-on patch in reply to my last version in this thread which is
based on the tip of next.
- Emily
next prev parent reply other threads:[~2019-05-29 20:09 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
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 [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190529200944.GA52337@google.com \
--to=emilyshaffer@google.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=jonathantanmy@google.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).