git/list[1] front-page[2] threads[3] people[4] search[5] about
 

rs/commit-list-sort-in-batch

From
Jeff King <peff@peff.net>
Date
Apr 7, 2012, 07:27 UTC
Message-ID
<20120407072724.GA818@sigill.intra.peff.net>
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
Previous: Junio C HamanoNext: Jeff King
Message 2 of 4 in “What's cooking in git.git (Apr 2012, #03; Fri, 6)”
  1. Junio C HamanoApr 6, 2012
  2. rs/commit-list-sort-in-batchJeff King, Apr 7, 2012
  3. Jeff KingApr 7, 2012
  4. Junio C HamanoApr 9, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.