git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Stephan Beyer <s-beyer@gmx.net>,
	Daniel Barkalow <barkalow@iabervon.org>,
	Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH v2 5/5] pick: simplify bogus comment about commiting immediately
Date: Sat, 01 Aug 2009 17:46:06 +0200	[thread overview]
Message-ID: <20090801154607.20922.26129.chriscool@tuxfamily.org> (raw)

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

                 reply	other threads:[~2009-08-01 15:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090801154607.20922.26129.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=s-beyer@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).