git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] doc: MyFirstContribution: fix cmd placement instructions

From
Philip Oakley <philipoakley@iee.email>
Date
Sep 26, 2019, 21:42 UTC
Message-ID
<0a52455d-9859-587e-9c88-bf47676b9b28@iee.email>
In-Reply-To
<20190926190522.3424-1-pedroteosousa@gmail.com>
On 26/09/2019 20:05, Pedro Sousa wrote:
Show 7 quoted lines
> Using the pull command instead of push is more accurate when giving
> instructions on placing the psuh command in alphabetical order.
>
> Signed-off-by: Pedro Sousa <pedroteosousa@gmail.com>
> ---
> Changes since v1: Addressed Philip's comments on making alphabetical
> sort instructions more explicit

LGTM. Thanks. Philip

Show 46 quoted lines
>
>   Documentation/MyFirstContribution.txt | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
> index f867037..5e9b808 100644
> --- a/Documentation/MyFirstContribution.txt
> +++ b/Documentation/MyFirstContribution.txt
> @@ -97,8 +97,8 @@ int cmd_psuh(int argc, const char **argv, const char *prefix)
>   ----
>   
>   We'll also need to add the declaration of psuh; open up `builtin.h`, find the
> -declaration for `cmd_push`, and add a new line for `psuh` immediately before it,
> -in order to keep the declarations sorted:
> +declaration for `cmd_pull`, and add a new line for `psuh` immediately before it,
> +in order to keep the declarations alphabetically sorted:
>   
>   ----
>   int cmd_psuh(int argc, const char **argv, const char *prefix);
> @@ -123,7 +123,7 @@ int cmd_psuh(int argc, const char **argv, const char *prefix)
>   }
>   ----
>   
> -Let's try to build it.  Open `Makefile`, find where `builtin/push.o` is added
> +Let's try to build it.  Open `Makefile`, find where `builtin/pull.o` is added
>   to `BUILTIN_OBJS`, and add `builtin/psuh.o` in the same way next to it in
>   alphabetical order. Once you've done so, move to the top-level directory and
>   build simply with `make`. Also add the `DEVELOPER=1` variable to turn on
> @@ -149,7 +149,7 @@ a `cmd_struct` to the `commands[]` array. `struct cmd_struct` takes a string
>   with the command name, a function pointer to the command implementation, and a
>   setup option flag. For now, let's keep mimicking `push`. Find the line where
>   `cmd_push` is registered, copy it, and modify it for `cmd_psuh`, placing the new
> -line in alphabetical order.
> +line in alphabetical order (immediately before `cmd_pull`).
>   
>   The options are documented in `builtin.h` under "Adding a new built-in." Since
>   we hope to print some data about the user's current workspace context later,
> @@ -167,7 +167,7 @@ Check it out! You've got a command! Nice work! Let's commit this.
>   
>   `git status` reveals modified `Makefile`, `builtin.h`, and `git.c` as well as
>   untracked `builtin/psuh.c` and `git-psuh`. First, let's take care of the binary,
> -which should be ignored. Open `.gitignore` in your editor, find `/git-push`, and
> +which should be ignored. Open `.gitignore` in your editor, find `/git-pull`, and
>   add an entry for your new command in alphabetical order:
>   
>   ----
Previous: Pedro Sousa
Message 5 of 5 in “doc: MyFirstContribution: fix cmd placement instructions”
  1. doc: MyFirstContribution: fix cmd placement instructionsPedro Sousa, Sep 19, 2019
  2. Emily ShafferSep 19, 2019
  3. Philip OakleySep 20, 2019
  4. doc: MyFirstContribution: fix cmd placement instructionsPedro Sousa, Sep 26, 2019
  5. Philip OakleySep 26, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.