* [PATCH v2 5/5] pick: simplify bogus comment about commiting immediately
@ 2009-08-01 15:46 Christian Couder
0 siblings, 0 replies; only message in thread
From: Christian Couder @ 2009-08-01 15:46 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Johannes Schindelin, Stephan Beyer, Daniel Barkalow,
Jakub Narebski
as suggested by Junio, and add some interesting comments from Junio.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-01 15:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-01 15:46 [PATCH v2 5/5] pick: simplify bogus comment about commiting immediately Christian Couder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).