{"thread":{"id":"40148","subject":"git log date filter behavior with --date-order","startedAt":"2015-08-21T14:56:18Z","lastAt":"2015-08-21T14:56:18Z","messageCount":1,"participants":["Kirill Likhodedov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"268424","messageId":"C06C0196-5DEB-4C7B-A714-48D009688342@gmail.com","threadId":"40148","inReplyTo":null,"subject":"git log date filter behavior with --date-order","fromName":"Kirill Likhodedov","fromEmail":"kirill.likhodedov@gmail.com","sentAt":"2015-08-21T14:56:18Z","receivedAt":"2015-08-21T14:56:18Z","isPatch":false,"sender":{"key":"kirill.likhodedov@gmail.com","avatar":"https://gravatar.com/avatar/2b7db7c43bdd506a2045f8d0aa738c4cee6dcaaac813b76615e5224305a7e4d2?d=mp&s=160"},"body":"Hi,\n\nI’ve faced a strange behavior when filtering git log by date.\n\nWhen used with “--date-order” it gives significantly less results that when used without that option:\n\n#  git log --pretty=oneline --remotes \"--after=Wed May 20 23:00:00 MSK 2015\" \"--before=Fri May 22 00:00:00 MSK 2015\" -- | wc -l\n      85\n#  git log --pretty=oneline --remotes \"--after=Wed May 20 23:00:00 MSK 2015\" \"--before=Fri May 22 00:00:00 MSK 2015\" --date-order -- | wc -l\n      25\n\nMy assumption is that git log walks from the specified heads down to the past until it finds a commit which commit date matches the filter. Then it continues until it finds a commit which commit date doesn’t match the filter. Is it true?\n\nCommits from “matching” and “unmatching” parts of the output are located in different branches which are being developed in parallel. \nAFAIU the flag “--date-order” is meant to place commits from different branches near each other, if they were performed at the same time.\n\nBut when I looked both at the “matching\" and the “unmatching” commits in the whole `git log --date-order` view, I’ve noticed that they are placed really far away from each other (with about 4K commits between them).\n\nCould you please give me a hint, why can git log --date-order behave like that? \n\nI’ll be happy to provide more details if needed. \n\nThanks a lot!\nKirill."}]}