git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>, git@vger.kernel.org
Subject: rs/commit-list-sort-in-batch
Date: Sat, 7 Apr 2012 03:27:25 -0400	[thread overview]
Message-ID: <20120407072724.GA818@sigill.intra.peff.net> (raw)
In-Reply-To: <7vwr5szi7z.fsf@alter.siamese.dyndns.org>

On Fri, Apr 06, 2012 at 02:02:56PM -0700, Junio C Hamano wrote:

> * rs/commit-list-sort-in-batch (2012-04-02) 3 commits
>  - revision: insert unsorted, then sort in prepare_revision_walk()
>  - commit: use mergesort() in commit_list_sort_by_date()
>  - add mergesort() for linked lists

Looks like you applied these patches right on v1.7.9. However, they need
Thomas's 5e8617f to compile, which comes later. There's no textual
conflict, but test-mergesort.c need strbuf_getwholeline_fd, which is
made public by 5e8617f.

However, I don't think there's any reason to prefer the fd version over
the stdio one (in fact, it is much less efficient). So this could be
squashed in to the first patch instead of rebasing:

diff --git a/test-mergesort.c b/test-mergesort.c
index 02441ab..1dd82fd 100644
--- a/test-mergesort.c
+++ b/test-mergesort.c
@@ -28,7 +28,7 @@ int main(int argc, const char **argv)
 	struct strbuf sb = STRBUF_INIT;
 
 	for (;;) {
-		if (strbuf_getwholeline_fd(&sb, 0, '\n'))
+		if (strbuf_getwholeline(&sb, stdin, '\n'))
 			break;
 		line = xmalloc(sizeof(struct line));
 		line->text = strbuf_detach(&sb, NULL);

-Peff

  reply	other threads:[~2012-04-07  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-06 21:02 What's cooking in git.git (Apr 2012, #03; Fri, 6) Junio C Hamano
2012-04-07  7:27 ` Jeff King [this message]
2012-04-07  7:32   ` rs/commit-list-sort-in-batch Jeff King
2012-04-09 19:46     ` rs/commit-list-sort-in-batch Junio C Hamano

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=20120407072724.GA818@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rene.scharfe@lsrfire.ath.cx \
    /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).