IssueRaiser

Sort commits topologically first instead of by author date

Like `git log --topo-order` does by default. E.g.: https://github.com/cirosantilli/test-log-order/commits/master , [screenshot 2015-05-01](https://web.archive.org/web/20150501073605/https://github.com/cirosantilli/test-log-order/commits/master). Generated with: ``` git init touch '0' git add '0' date='2011-01-01 00:01:01 +0000' GIT_COMMITTER_DATE="$date" git commit -m '0' --date "$date" touch '1' git add '1' date='2010-01-01 00:01:01 +0000' GIT_COMMITTER_DATE="$date" git commit -m '1' --date "$date" ``` Tree: ``` 0 --> 1 ``` Actual log: | Commit | Date | | --- | --- | | 0 | 2011 | | 1 | 2010 | Expected log: | Commit | Date | | --- | --- | | 1 | 2010 | | 0 | 2011 | The actual tree structure is more important than the timestamp, which is just an arbitrary value that can be controlled by users. For example, if an old commit gets merged later, I'd expect to see it on the top of the log as the merge date is what matters most. Not to mention my evil desire to annoy projects by making a future max commit https://github.com/cirosantilli/test/commit/ff86a7bc45e3c28d7838cb0ac785720880481976, create a fake account, find a typo on some famous project with `aspell` and make a pull request. I bet it would pass, and when the project admins notice it, they would likely be forced to force push it away. MUAHAHAHA. But I won't do it :-) Maybe this was mentioned at: https://help.github.com/articles/why-are-my-commits-in-the-wrong-order/ IMHO the best option is `--topo-order` from

Posted by cirosantilli on Apr 23, 2015, 10:47 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.7,000 issues0 comments

complaint (E-commerce)

Sort commits topologically first instead of by author date

cirosantilliApr 23, 2015, 10:47 AM

Like `git log --topo-order` does by default. E.g.: https://github.com/cirosantilli/test-log-order/commits/master , [screenshot 2015-05-01](https://web.archive.org/web/20150501073605/https://github.com/cirosantilli/test-log-order/commits/master). Generated with: ``` git init touch '0' git add '0' date='2011-01-01 00:01:01 +0000' GIT_COMMITTER_DATE="$date" git commit -m '0' --date "$date" touch '1' git add '1' date='2010-01-01 00:01:01 +0000' GIT_COMMITTER_DATE="$date" git commit -m '1' --date "$date" ``` Tree: ``` 0 --> 1 ``` Actual log: | Commit | Date | | --- | --- | | 0 | 2011 | | 1 | 2010 | Expected log: | Commit | Date | | --- | --- | | 1 | 2010 | | 0 | 2011 | The actual tree structure is more important than the timestamp, which is just an arbitrary value that can be controlled by users. For example, if an old commit gets merged later, I'd expect to see it on the top of the log as the merge date is what matters most. Not to mention my evil desire to annoy projects by making a future max commit https://github.com/cirosantilli/test/commit/ff86a7bc45e3c28d7838cb0ac785720880481976, create a fake account, find a typo on some famous project with `aspell` and make a pull request. I bet it would pass, and when the project admins notice it, they would likely be forced to force push it away. MUAHAHAHA. But I won't do it :-) Maybe this was mentioned at: https://help.github.com/articles/why-are-my-commits-in-the-wrong-order/ IMHO the best option is `--topo-order` from

Comments (0)

No comments yet. Start the discussion.

Comment on this issue