From: Junio C Hamano <junkio@cox.net>
To: Paul Mackerras <paulus@samba.org>
Cc: git@vger.kernel.org
Subject: Re: git-rev-list --date-order ?
Date: Wed, 15 Feb 2006 19:11:21 -0800 [thread overview]
Message-ID: <7vpsloknfq.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <17395.58926.26670.23572@cargo.ozlabs.ibm.com> (Paul Mackerras's message of "Thu, 16 Feb 2006 13:40:46 +1100")
Paul Mackerras <paulus@samba.org> writes:
> Junio,
>
> Gitk has a -d option that tells it to reorder the commits in
> decreasing order of their commit time, subject to the constraint that
> parents come after all of their children. Currently it uses
> git-rev-list --header --topo-order --parents and then reorders the
> commits internally.
>
> How hard would it be to add a --date-order flag to git-rev-list to
> make it order the commits in decreasing commit time order, subject to
> the constraint that parents come after their children?
>
> If we had that then I could remove another chunk of code from gitk and
> make it a bit faster.
It's been a while that I read the topo-order code, but I suspect
something like this? I may be completely off the mark here.
--
diff --git a/commit.c b/commit.c
index 67e11d7..0d94e4d 100644
--- a/commit.c
+++ b/commit.c
@@ -630,7 +630,9 @@ void sort_in_topological_order(struct co
}
next=next->next;
}
+
/* process the list in topological order */
+ sort_by_date(&work);
while (work) {
struct commit * work_item = pop_commit(&work);
struct sort_node * work_node = (struct sort_node *)work_item->object.util;
@@ -648,7 +650,7 @@ void sort_in_topological_order(struct co
*/
pn->indegree--;
if (!pn->indegree)
- commit_list_insert(parent, &work);
+ insert_by_date(parent, &work);
}
parents=parents->next;
}
next prev parent reply other threads:[~2006-02-16 3:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-16 2:40 git-rev-list --date-order ? Paul Mackerras
2006-02-16 3:11 ` Junio C Hamano [this message]
2006-02-16 6:18 ` [PATCH] topo-order: make --date-order optional 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=7vpsloknfq.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/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