{"thread":{"id":"43525","subject":"[PATCH] [checkout-index] Give names to stages","startedAt":"2006-12-03T09:49:46Z","lastAt":"2006-12-03T09:49:46Z","messageCount":1,"participants":["Luben Tuikov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"295282","messageId":"651451.91694.qm@web31813.mail.mud.yahoo.com","threadId":"43525","inReplyTo":null,"subject":"[PATCH] [checkout-index] Give names to stages","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-12-03T09:49:46Z","receivedAt":"2006-12-03T09:49:46Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"One can now say \"git-checkout-index --stage=ours ...\"  or\n\"git-checkout-index --stage=theirs ...\", instead of having\nto remember the corresponding number assigned to each stage.\n\nSigned-off-by: Luben Tuikov <ltuikov@yahoo.com>\n---\n builtin-checkout-index.c |   11 ++++++++++-\n 1 files changed, 10 insertions(+), 1 deletions(-)\n\nI find this quite helpful when resolving.\n\n\n\ndiff --git a/builtin-checkout-index.c b/builtin-checkout-index.c\nindex b097c88..d54a290 100644\n--- a/builtin-checkout-index.c\n+++ b/builtin-checkout-index.c\n@@ -236,8 +236,17 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \t\t\t\tint ch = arg[8];\n \t\t\t\tif ('1' <= ch && ch <= '3')\n \t\t\t\t\tcheckout_stage = arg[8] - '0';\n+\t\t\t\telse if (!strncmp(arg+8, \"ancestor\", 8))\n+\t\t\t\t\tcheckout_stage = 1;\n+\t\t\t\telse if (!strncmp(arg+8, \"ours\", 4))\n+\t\t\t\t\tcheckout_stage = 2;\n+\t\t\t\telse if (!strncmp(arg+8, \"HEAD\", 4))\n+\t\t\t\t\tcheckout_stage = 2;\n+\t\t\t\telse if (!strncmp(arg+8, \"theirs\", 6))\n+\t\t\t\t\tcheckout_stage = 3;\n \t\t\t\telse\n-\t\t\t\t\tdie(\"stage should be between 1 and 3 or all\");\n+\t\t\t\t\tdie(\"stage should be \"\n+\t\t\t\t\t    \"(1|ancestor)|(2|ours|HEAD)|(3|theirs)\");\n \t\t\t}\n \t\t\tcontinue;\n \t\t}\n-- \n1.4.4.1.gc87e\n\n"}]}