@@ -713,31 +713,33 @@ Repository_cherrypick(Repository *self, PyObject *py_oid)
713
713
}
714
714
715
715
PyDoc_STRVAR (Repository_walk__doc__ ,
716
- "walk(oid[, sort_mode]) -> iterator\n"
717
- "\n"
718
- "Generator that traverses the history starting from the given commit.\n"
719
- "The following types of sorting could be used to control traversing\n"
720
- "direction:\n"
721
- "\n"
722
- "* GIT_SORT_NONE. This is the default sorting for new walkers.\n"
723
- " Sort the repository contents in no particular ordering\n"
724
- "* GIT_SORT_TOPOLOGICAL. Sort the repository contents in topological order\n"
725
- " (parents before children); this sorting mode can be combined with\n"
726
- " time sorting.\n"
727
- "* GIT_SORT_TIME. Sort the repository contents by commit time\n"
728
- "* GIT_SORT_REVERSE. Iterate through the repository contents in reverse\n"
729
- " order; this sorting mode can be combined with any of the above.\n"
730
- "\n"
731
- "Example:\n"
732
- "\n"
733
- " >>> from pygit2 import Repository\n"
734
- " >>> from pygit2 import GIT_SORT_TOPOLOGICAL, GIT_SORT_REVERSE\n"
735
- " >>> repo = Repository('.git')\n"
736
- " >>> for commit in repo.walk(repo.head.target, GIT_SORT_TOPOLOGICAL):\n"
737
- " ... print(commit.message)\n"
738
- " >>> for commit in repo.walk(repo.head.target, GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE):\n"
739
- " ... print(commit.message)\n"
740
- " >>>\n" );
716
+ "walk(oid[, sort_mode]) -> iterator\n"
717
+ "\n"
718
+ "Generator that traverses the history starting from the given commit.\n"
719
+ "The following types of sorting could be used to control traversing\n"
720
+ "direction:\n"
721
+ "\n"
722
+ "* GIT_SORT_NONE. Sort the output with the same default method from\n"
723
+ " `git`: reverse chronological order. This is the default sorting for\n"
724
+ " new walkers.\n"
725
+ "* GIT_SORT_TOPOLOGICAL. Sort the repository contents in topological order\n"
726
+ " (no parents before all of its children are shown); this sorting mode\n"
727
+ " can be combined with time sorting to produce `git`'s `--date-order``.\n"
728
+ "* GIT_SORT_TIME. Sort the repository contents by commit time; this sorting\n"
729
+ " mode can be combined with topological sorting.\n"
730
+ "* GIT_SORT_REVERSE. Iterate through the repository contents in reverse\n"
731
+ " order; this sorting mode can be combined with any of the above.\n"
732
+ "\n"
733
+ "Example:\n"
734
+ "\n"
735
+ " >>> from pygit2 import Repository\n"
736
+ " >>> from pygit2 import GIT_SORT_TOPOLOGICAL, GIT_SORT_REVERSE\n"
737
+ " >>> repo = Repository('.git')\n"
738
+ " >>> for commit in repo.walk(repo.head.target, GIT_SORT_TOPOLOGICAL):\n"
739
+ " ... print(commit.message)\n"
740
+ " >>> for commit in repo.walk(repo.head.target, GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE):\n"
741
+ " ... print(commit.message)\n"
742
+ " >>>\n" );
741
743
742
744
PyObject *
743
745
Repository_walk (Repository * self , PyObject * args )
0 commit comments