{"thread":{"id":"16551","subject":"[PATCH] Add a built-in alias for 'stage' to the 'add' command","startedAt":"2008-12-02T06:14:55Z","lastAt":"2008-12-03T02:18:25Z","messageCount":4,"participants":["Scott Chacon","Nguyen Thai Ngoc Duy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96930","messageId":"20081202061455.GA48848@agadorsparticus","threadId":"16551","inReplyTo":null,"subject":"[PATCH] Add a built-in alias for 'stage' to the 'add' command","fromName":"Scott Chacon","fromEmail":"schacon@gmail.com","sentAt":"2008-12-02T06:14:55Z","receivedAt":"2008-12-02T06:14:55Z","isPatch":true,"sender":{"key":"schacon@gmail.com","avatar":"https://gravatar.com/avatar/9b13a8a078e1dcf8588c4eea9554445d51ebed6c41b51f56f4d96738130b05c6?d=mp&s=160"},"body":"This comes from conversation at the GitTogether where we thought it would\nbe helpful to be able to teach people to 'stage' files because it tends\nto cause confusion when told that they have to keep 'add'ing them.\n\nThis continues the movement to start referring to the index as a\nstaging area (eg: the --staged alias to 'git diff'). Also adds a\ndoc file for 'git stage' that basically points to the docs for\n'git add'.\n\nSigned-off-by: Scott Chacon <schacon@gmail.com>\n---\n\nI changed the tense of a few things in the commit message and modified \nthe help file to be simpler.\n\n Documentation/git-stage.txt |   19 +++++++++++++++++++\n git.c                       |    1 +\n 2 files changed, 20 insertions(+), 0 deletions(-)\n create mode 100644 Documentation/git-stage.txt\n\ndiff --git a/Documentation/git-stage.txt b/Documentation/git-stage.txt\nnew file mode 100644\nindex 0000000..7f251a5\n--- /dev/null\n+++ b/Documentation/git-stage.txt\n@@ -0,0 +1,19 @@\n+git-stage(1)\n+==============\n+\n+NAME\n+----\n+git-stage - Add file contents to the staging area\n+\n+\n+SYNOPSIS\n+--------\n+[verse]\n+'git stage' args...\n+\n+\n+DESCRIPTION\n+-----------\n+\n+This is a synonym for linkgit:git-add[1].  Please refer to the\n+documentation of that command.\ndiff --git a/git.c b/git.c\nindex 89feb0b..9e5813c 100644\n--- a/git.c\n+++ b/git.c\n@@ -266,6 +266,7 @@ static void handle_internal_command(int argc, const char **argv)\n \tconst char *cmd = argv[0];\n \tstatic struct cmd_struct commands[] = {\n \t\t{ \"add\", cmd_add, RUN_SETUP | NEED_WORK_TREE },\n+\t\t{ \"stage\", cmd_add, RUN_SETUP | NEED_WORK_TREE },\n \t\t{ \"annotate\", cmd_annotate, RUN_SETUP },\n \t\t{ \"apply\", cmd_apply },\n \t\t{ \"archive\", cmd_archive },\n-- \n1.6.0.8.gc9c8\n"},{"id":"96937","messageId":"fcaeb9bf0812020436n69a21c96g4c13976e493372d9@mail.gmail.com","threadId":"16551","inReplyTo":"20081202061455.GA48848@agadorsparticus","subject":"Re: [PATCH] Add a built-in alias for 'stage' to the 'add' command","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2008-12-02T12:36:17Z","receivedAt":"2008-12-02T12:36:17Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On 12/2/08, Scott Chacon <schacon@gmail.com> wrote:\n>  diff --git a/git.c b/git.c\n>  index 89feb0b..9e5813c 100644\n>  --- a/git.c\n>  +++ b/git.c\n>  @@ -266,6 +266,7 @@ static void handle_internal_command(int argc, const char **argv)\n>         const char *cmd = argv[0];\n>         static struct cmd_struct commands[] = {\n>                 { \"add\", cmd_add, RUN_SETUP | NEED_WORK_TREE },\n>  +               { \"stage\", cmd_add, RUN_SETUP | NEED_WORK_TREE },\n>                 { \"annotate\", cmd_annotate, RUN_SETUP },\n>                 { \"apply\", cmd_apply },\n>                 { \"archive\", cmd_archive },\n\nNit-picking. There are some references to \"git add\" in builtin-add.c,\nlike help usage or error message (\"Maybe you wanted to say 'git add\n.'?\\n\"). Should it refer to \"git stage\" instead as well?\n-- \nDuy\n"},{"id":"97010","messageId":"7vskp6huhg.fsf@gitster.siamese.dyndns.org","threadId":"16551","inReplyTo":"20081202061455.GA48848@agadorsparticus","subject":"Re: [PATCH] Add a built-in alias for 'stage' to the 'add' command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-03T02:18:19Z","receivedAt":"2008-12-03T02:18:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"},{"id":"97011","messageId":"7vmyfehuha.fsf@gitster.siamese.dyndns.org","threadId":"16551","inReplyTo":"fcaeb9bf0812020436n69a21c96g4c13976e493372d9@mail.gmail.com","subject":"Re: [PATCH] Add a built-in alias for 'stage' to the 'add' command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-03T02:18:25Z","receivedAt":"2008-12-03T02:18:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Nguyen Thai Ngoc Duy\" <pclouds@gmail.com> writes:\n\n> On 12/2/08, Scott Chacon <schacon@gmail.com> wrote:\n>>  diff --git a/git.c b/git.c\n>>  index 89feb0b..9e5813c 100644\n>>  --- a/git.c\n>>  +++ b/git.c\n>>  @@ -266,6 +266,7 @@ static void handle_internal_command(int argc, const char **argv)\n>>         const char *cmd = argv[0];\n>>         static struct cmd_struct commands[] = {\n>>                 { \"add\", cmd_add, RUN_SETUP | NEED_WORK_TREE },\n>>  +               { \"stage\", cmd_add, RUN_SETUP | NEED_WORK_TREE },\n>>                 { \"annotate\", cmd_annotate, RUN_SETUP },\n>>                 { \"apply\", cmd_apply },\n>>                 { \"archive\", cmd_archive },\n>\n> Nit-picking. There are some references to \"git add\" in builtin-add.c,\n> like help usage or error message (\"Maybe you wanted to say 'git add\n> .'?\\n\"). Should it refer to \"git stage\" instead as well?\n\nI do not think that is necessary.  As git-stage(1) makes it clear, it is\nan alias to \"add\", not the other way around.\n"}]}