[PATCH v2 5/5] pick: simplify bogus comment about commiting immediately
From: Christian Couder <hidden>
Date: 2016-06-15 22:47:08
Subsystem:
the rest · Maintainer:
Linus Torvalds
as suggested by Junio, and add some interesting comments from Junio. Signed-off-by: Christian Couder <redacted> --- pick.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/pick.c b/pick.c
index a6b1d6f..128a191 100644
--- a/pick.c
+++ b/pick.c@@ -63,6 +63,14 @@ static struct tree *empty_tree(void) * Pick changes introduced by "commit" argument into current working * tree and index. * + * It starts from the current index (not HEAD), and allow the effect + * of one commit replayed (either forward or backward) to that state, + * leaving the result in the index. + * + * You do not have to start from a commit, so you can replay many + * commits to the index in sequence without commiting in between to + * squash multiple steps if you wanted to. + * * Return 0 on success. * Return negative value on error before picking, * and a positive value after picking,
@@ -85,10 +93,8 @@ int pick_commit(struct commit *pick_commit, int mainline, int flags, commit = pick_commit; /* - * We do not intend to commit immediately. We just want to - * merge the differences in, so let's compute the tree - * that represents the "current" state for merge-recursive - * to work on. + * Let's compute the tree that represents the "current" state + * for merge-recursive to work on. */ if (write_cache_as_tree(head, 0, NULL)) return error("Your index file is unmerged.");
--
1.6.4.133.g8a5c8