Skip to content

Commit 82d4c0e

Browse files
committed
revwalk: update the description for the default sorting
It changed from implementation-defined to git's default sorting, as there are systems (e.g. rebase) which depend on this order. Also specify more explicitly how you can get git's "date-order".
1 parent ea1ceb7 commit 82d4c0e

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

include/git2/revwalk.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,15 @@ GIT_BEGIN_DECL
2525
*/
2626
typedef enum {
2727
/**
28-
* Sort the repository contents in no particular ordering;
29-
* this sorting is arbitrary, implementation-specific
30-
* and subject to change at any time.
28+
* Sort the output with the same default time-order method from git.
3129
* This is the default sorting for new walkers.
3230
*/
3331
GIT_SORT_NONE = 0,
3432

3533
/**
36-
* Sort the repository contents in topological order
37-
* (parents before children); this sorting mode
38-
* can be combined with time sorting.
34+
* Sort the repository contents in topological order (parents before
35+
* children); this sorting mode can be combined with time sorting to
36+
* produce git's "time-order".
3937
*/
4038
GIT_SORT_TOPOLOGICAL = 1 << 0,
4139

src/revwalk.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,10 +555,6 @@ static int prepare_walk(git_revwalk *walk)
555555
}
556556
}
557557

558-
for (list = commits; list; list = list->next) {
559-
printf("%s: commit %s\n", __func__, git_oid_tostr_s(&list->item->oid));
560-
}
561-
562558
if ((error = limit_list(&commits, walk, commits)) < 0)
563559
return error;
564560

0 commit comments

Comments
 (0)