{"thread":{"id":"20333","subject":"[PATCH v2 5/5] pick: simplify bogus comment about commiting immediately","startedAt":"2009-08-01T15:46:06Z","lastAt":"2009-08-01T15:46:06Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":2,"patchTotal":5},"messages":[{"id":"119342","messageId":"20090801154607.20922.26129.chriscool@tuxfamily.org","threadId":"20333","inReplyTo":null,"subject":"[PATCH v2 5/5] pick: simplify bogus comment about commiting immediately","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-08-01T15:46:06Z","receivedAt":"2009-08-01T15:46:06Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"as suggested by Junio, and add some interesting comments from Junio.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n pick.c |   14 ++++++++++----\n 1 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/pick.c b/pick.c\nindex a6b1d6f..128a191 100644\n--- a/pick.c\n+++ b/pick.c\n@@ -63,6 +63,14 @@ static struct tree *empty_tree(void)\n  * Pick changes introduced by \"commit\" argument into current working\n  * tree and index.\n  *\n+ * It starts from the current index (not HEAD), and allow the effect\n+ * of one commit replayed (either forward or backward) to that state,\n+ * leaving the result in the index.\n+ *\n+ * You do not have to start from a commit, so you can replay many\n+ * commits to the index in sequence without commiting in between to\n+ * squash multiple steps if you wanted to.\n+ *\n  * Return 0 on success.\n  * Return negative value on error before picking,\n  * and a positive value after picking,\n@@ -85,10 +93,8 @@ int pick_commit(struct commit *pick_commit, int mainline, int flags,\n \tcommit = pick_commit;\n \n \t/*\n-\t * We do not intend to commit immediately.  We just want to\n-\t * merge the differences in, so let's compute the tree\n-\t * that represents the \"current\" state for merge-recursive\n-\t * to work on.\n+\t * Let's compute the tree that represents the \"current\" state\n+\t * for merge-recursive to work on.\n \t */\n \tif (write_cache_as_tree(head, 0, NULL))\n \t\treturn error(\"Your index file is unmerged.\");\n-- \n1.6.4.133.g8a5c8\n"}]}