{"thread":{"id":"16541","subject":"[PATCH] added a built-in alias for 'stage' to the 'add' command","startedAt":"2008-12-01T17:29:02Z","lastAt":"2008-12-02T01:38:20Z","messageCount":3,"participants":["Scott Chacon","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96873","messageId":"20081201172902.GA41963@agadorsparticus","threadId":"16541","inReplyTo":null,"subject":"[PATCH] added a built-in alias for 'stage' to the 'add' command","fromName":"Scott Chacon","fromEmail":"schacon@gmail.com","sentAt":"2008-12-01T17:29:02Z","receivedAt":"2008-12-01T17:29:02Z","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 added 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 Documentation/git-stage.txt |   21 +++++++++++++++++++++\n git.c                       |    1 +\n 2 files changed, 22 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..0640198\n--- /dev/null\n+++ b/Documentation/git-stage.txt\n@@ -0,0 +1,21 @@\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' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]\n+\t  [--all | [--update | -u]] [--intent-to-add | -N]\n+\t  [--refresh] [--ignore-errors] [--] <filepattern>...\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":"96883","messageId":"20081201182557.GA24443@coredump.intra.peff.net","threadId":"16541","inReplyTo":"20081201172902.GA41963@agadorsparticus","subject":"Re: [PATCH] added a built-in alias for 'stage' to the 'add' command","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-12-01T18:25:57Z","receivedAt":"2008-12-01T18:25:57Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Dec 01, 2008 at 09:29:02AM -0800, Scott Chacon wrote:\n\n> this comes from conversation at the GitTogether where we thought it would\n> be helpful to be able to teach people to 'stage' files because it tends\n> to cause confusion when told that they have to keep 'add'ing them.\n> \n> This continues the movement to start referring to the index as a\n> staging area (eg: the --staged alias to 'git diff'). Also added a\n> doc file for 'git stage' that basically points to the docs for\n> 'git add'.\n\nFWIW, I think this is a step in the right direction. Or at least if it's\nthe wrong direction, I don't think we're actually _hurting_ anybody,\nsince we're not changing existing commands.\n\nOut of curiosity, have you had any experiences referring to this as \"git\nstage\" (maybe just by setting a per-user alias) with new users?\n\n> +SYNOPSIS\n> +--------\n> +[verse]\n> +'git stage' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]\n> +\t  [--all | [--update | -u]] [--intent-to-add | -N]\n> +\t  [--refresh] [--ignore-errors] [--] <filepattern>...\n\nIt seems like this might get stale with respect to git-add(1). Since\nwe're not hiding the fact that this is really an alias for \"add\", maybe\nit would be better to just have \"git stage [options] [--]\n<filepattern>\" (or maybe even something simpler).\n\n-Peff\n"},{"id":"96900","messageId":"7vbpvvqrub.fsf@gitster.siamese.dyndns.org","threadId":"16541","inReplyTo":"20081201172902.GA41963@agadorsparticus","subject":"Re: [PATCH] added a built-in alias for 'stage' to the 'add' command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-02T01:38:20Z","receivedAt":"2008-12-02T01:38:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Scott Chacon <schacon@gmail.com> writes:\n\n> Subject: Re: [PATCH] added a built-in alias for 'stage' to the 'add' command\n\ns/added/Add/;\n\nWrite your commit log message in present tense (recall David Brown's talk\nat GitTogether '08? ;-)\n\n> this comes from conversation at the GitTogether where we thought it would\n\ns/this/This/;\n\n> be helpful to be able to teach people to 'stage' files because it tends\n> to cause confusion when told that they have to keep 'add'ing them.\n>\n> This continues the movement to start referring to the index as a\n> staging area (eg: the --staged alias to 'git diff'). Also added a\n> doc file for 'git stage' that basically points to the docs for\n> 'git add'.\n>\n> Signed-off-by: Scott Chacon <schacon@gmail.com>\n\nI think this is fine but I'd rather not risk the documentation getting\nstale over time, so...\n\n> +SYNOPSIS\n> +--------\n> +[verse]\n> +'git stage' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]\n> +\t  [--all | [--update | -u]] [--intent-to-add | -N]\n> +\t  [--refresh] [--ignore-errors] [--] <filepattern>...\n\n...I think this should read something like\n\n\t'git stage' args...\n"}]}