aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-07 10:35:54 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-11 15:15:21 -0700
commit81c6b38b67019eff48e8e5c324bb77f6c796c0b5 (patch)
treedf64e27cad14932b531c7e28a4638c885739ac52 /revision.c
parentda24b1044f7dc85cda52d6423f5a794a7074fbf8 (diff)
downloadgit-81c6b38b67019eff48e8e5c324bb77f6c796c0b5.tar.gz
git-81c6b38b67019eff48e8e5c324bb77f6c796c0b5.tar.xz
log: --author-date-order
Sometimes people would want to view the commits in parallel histories in the order of author dates, not committer dates. Teach "topo-order" sort machinery to do so, using a commit-info slab to record the author dates of each commit, and prio-queue to sort them. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 966ebbc54..12d9b64b3 100644
--- a/revision.c
+++ b/revision.c
@@ -1393,6 +1393,9 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (!strcmp(arg, "--date-order")) {
revs->sort_order = REV_SORT_BY_COMMIT_DATE;
revs->topo_order = 1;
+ } else if (!strcmp(arg, "--author-date-order")) {
+ revs->sort_order = REV_SORT_BY_AUTHOR_DATE;
+ revs->topo_order = 1;
} else if (!prefixcmp(arg, "--early-output")) {
int count = 100;
switch (arg[14]) {