Re: [PATCH 1/3] myfirstcontrib: add 'psuh' to command-list.txt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Emily Shaffer wrote:

> Users can discover commands and their brief usage by running 'git help
> git' or 'git help -a'; both of these pages list all available commands
> based on the contents of 'command-list.txt'. That means adding a new
> command there is an important part of the new command process, and
> therefore belongs in the new command tutorial.

Makes sense.

Not about this patch: is there a way to detect this automatically?
E.g. if a command in git.c::commands doesn't appear in
command-list.txt, could we make Git fail "make test"?

[...]
> --- a/Documentation/MyFirstContribution.txt
> +++ b/Documentation/MyFirstContribution.txt
> @@ -534,6 +534,28 @@ you want to pass as a parameter something which would usually be interpreted as
>  a flag.) `parse_options()` will terminate parsing when it reaches `--` and give
>  you the rest of the options afterwards, untouched.
>  
> +Now that you have a usage hint, you can teach Git how to show it in the general
> +command list shown by `git help git` or `git help -a`, which is generated from
> +`command-list.txt`. Find the line for 'git-pull' so you can add your 'git-psuh'
> +line above it in alphabetical order. Now, we can add some attributes about the
> +command which impacts where it shows up in the aforementioned help commands. The

nit: s/impacts/impact/, to agree with "attributes"

> +top of `command-list.txt` shares some information about what each attribute
> +means; in those help pages, the commands are sorted according to these
> +attributes. `git psuh` is user-facing, or porcelain - so we will mark it as
                                             ^^^^^^^^^

optional: This might be an unfamiliar term to people not thinking of the
plumbing fixture / chrome analogy.  Is there anything we should do to
help them understand what's going on?

E.g. "git help glossary" says

	Porcelains expose more of a SCM interface than the plumbing.

> +"mainporcelain". For "mainporcelain" commands, the comments at the top of
> +`command-list.txt` indicate we can also optionally add an attribute from another
> +list; since `git psuh` shows some information about the user's workspace but
> +doesn't modify anything, let's mark it as "info". Make sure to keep your
> +attributes in the same style as the rest of `command-list.txt` using spaces to
> +align and delineate them:
> +
> +----
> +git-prune-packed                        plumbingmanipulators
> +git-psuh                                mainporcelain		info

tabs snuck in.

> +git-pull                                mainporcelain           remote
> +git-push                                mainporcelain           remote
> +----
> +

The rest looks good.

Thanks,
Jonathan



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux