{"thread":{"id":"33537","subject":"Bug with rev-list --reverse?","startedAt":"2013-04-18T10:17:14Z","lastAt":"2013-04-18T17:25:14Z","messageCount":7,"participants":["Felipe Contreras","John Keeping","Peter Krefting","Thomas Rast","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"214710","messageId":"CAMP44s25mUA1M+K+YKaC=bz3Dr7kSDyXK5g2ot8i+1EPy8zRhA@mail.gmail.com","threadId":"33537","inReplyTo":null,"subject":"Bug with rev-list --reverse?","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-18T10:17:14Z","receivedAt":"2013-04-18T10:17:14Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hi,\n\nIf I do these:\n\n% git log --oneline -1 v1.8.1.5^..v1.8.1.6\n% git log --oneline --reverse -1 v1.8.1.5^..v1.8.1.6\n\nI expect to get a different output, and not both showing v1.8.1.6.\nWouldn't you agree?\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"214712","messageId":"20130418102644.GY2278@serenity.lan","threadId":"33537","inReplyTo":"CAMP44s25mUA1M+K+YKaC=bz3Dr7kSDyXK5g2ot8i+1EPy8zRhA@mail.gmail.com","subject":"Re: Bug with rev-list --reverse?","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-04-18T10:26:44Z","receivedAt":"2013-04-18T10:26:44Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Thu, Apr 18, 2013 at 05:17:14AM -0500, Felipe Contreras wrote:\n> If I do these:\n> \n> % git log --oneline -1 v1.8.1.5^..v1.8.1.6\n> % git log --oneline --reverse -1 v1.8.1.5^..v1.8.1.6\n> \n> I expect to get a different output, and not both showing v1.8.1.6.\n> Wouldn't you agree?\n\nI expect to get the same output.  This is probably because I consider\n--reverse to be an output filter.  So I expect to show the commits\n\"v1.8.1.5^..v1.8.1.6 -1\" which selects a single commit and then show\nthat in reverse order.\n"},{"id":"214715","messageId":"alpine.DEB.2.00.1304181146090.30868@ds9.cixit.se","threadId":"33537","inReplyTo":"CAMP44s25mUA1M+K+YKaC=bz3Dr7kSDyXK5g2ot8i+1EPy8zRhA@mail.gmail.com","subject":"Re: Bug with rev-list --reverse?","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2013-04-18T10:47:41Z","receivedAt":"2013-04-18T10:47:41Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Felipe Contreras:\n\n> % git log --oneline -1 v1.8.1.5^..v1.8.1.6\n> % git log --oneline --reverse -1 v1.8.1.5^..v1.8.1.6\n>\n> I expect to get a different output, and not both showing v1.8.1.6.\n> Wouldn't you agree?\n\n  Quoting the manual page:\n\n  Commit Limiting\n    Besides specifying a range of commits that should be listed using the special notations explained in the description, additional commit limiting may be applied. Note that they are applied before commit ordering and formatting options, such as --reverse.\n\nGiven that, I would expect the output to be the same.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"214717","messageId":"CAMP44s1np9vxZS6N2+w-K=zzRhq4x2+eFBzu-HJMeoNjk7ze-Q@mail.gmail.com","threadId":"33537","inReplyTo":"20130418102644.GY2278@serenity.lan","subject":"Re: Bug with rev-list --reverse?","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-18T11:15:36Z","receivedAt":"2013-04-18T11:15:36Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Thu, Apr 18, 2013 at 5:26 AM, John Keeping <john@keeping.me.uk> wrote:\n> On Thu, Apr 18, 2013 at 05:17:14AM -0500, Felipe Contreras wrote:\n>> If I do these:\n>>\n>> % git log --oneline -1 v1.8.1.5^..v1.8.1.6\n>> % git log --oneline --reverse -1 v1.8.1.5^..v1.8.1.6\n>>\n>> I expect to get a different output, and not both showing v1.8.1.6.\n>> Wouldn't you agree?\n>\n> I expect to get the same output.  This is probably because I consider\n> --reverse to be an output filter.  So I expect to show the commits\n> \"v1.8.1.5^..v1.8.1.6 -1\" which selects a single commit and then show\n> that in reverse order.\n\nHow about this:\n\n% git log --oneline --reverse --max-count=1 v1.8.1.5^..v1.8.1.6\n\nIn this case --max-count is acting as \"start from the first commit\nbefore the tip\", not as \"output a maximum of one commit\". Given that\nthe name is max-count, I expect it to be the later.\n\nAnd if max-count doesn't select a maximum of n commits, then what does?\n\n-- \nFelipe Contreras\n"},{"id":"214718","messageId":"CAMP44s014Yv9+N7=0CYiYYybJCZJ7r-vQp_zcfg6Xo=3f21RWA@mail.gmail.com","threadId":"33537","inReplyTo":"alpine.DEB.2.00.1304181146090.30868@ds9.cixit.se","subject":"Re: Bug with rev-list --reverse?","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-18T11:18:42Z","receivedAt":"2013-04-18T11:18:42Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Thu, Apr 18, 2013 at 5:47 AM, Peter Krefting <peter@softwolves.pp.se> wrote:\n\n>> % git log --oneline -1 v1.8.1.5^..v1.8.1.6\n>> % git log --oneline --reverse -1 v1.8.1.5^..v1.8.1.6\n>>\n>> I expect to get a different output, and not both showing v1.8.1.6.\n>> Wouldn't you agree?\n>\n>\n>  Quoting the manual page:\n>\n>  Commit Limiting\n>    Besides specifying a range of commits that should be listed using the\n> special notations explained in the description, additional commit limiting\n> may be applied. Note that they are applied before commit ordering and\n> formatting options, such as --reverse.\n>\n> Given that, I would expect the output to be the same.\n\nIf expectations were based on documentation, all one has to do is\ndocument bugs, and there would be no bugs anymore :)\n\nCode can be changed to fit more appropriately user expectations (which\nare independent of documentation), and the documentation updated\naccordingly.\n\n-- \nFelipe Contreras\n"},{"id":"214726","messageId":"87k3nzx6dn.fsf@linux-k42r.v.cablecom.net","threadId":"33537","inReplyTo":"CAMP44s014Yv9+N7=0CYiYYybJCZJ7r-vQp_zcfg6Xo=3f21RWA@mail.gmail.com","subject":"Re: Bug with rev-list --reverse?","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-04-18T14:25:56Z","receivedAt":"2013-04-18T14:25:56Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> On Thu, Apr 18, 2013 at 5:47 AM, Peter Krefting <peter@softwolves.pp.se> wrote:\n>\n>>> % git log --oneline -1 v1.8.1.5^..v1.8.1.6\n>>> % git log --oneline --reverse -1 v1.8.1.5^..v1.8.1.6\n>>>\n>>> I expect to get a different output, and not both showing v1.8.1.6.\n>>> Wouldn't you agree?\n>>\n>>\n>>  Quoting the manual page:\n>>\n>>  Commit Limiting\n>>    Besides specifying a range of commits that should be listed using the\n>> special notations explained in the description, additional commit limiting\n>> may be applied. Note that they are applied before commit ordering and\n>> formatting options, such as --reverse.\n>>\n>> Given that, I would expect the output to be the same.\n>\n> If expectations were based on documentation, all one has to do is\n> document bugs, and there would be no bugs anymore :)\n>\n> Code can be changed to fit more appropriately user expectations (which\n> are independent of documentation), and the documentation updated\n> accordingly.\n\nIt's been this way forever, and applies to rev-list where we can't just\nbreak how options work (for fear of breaking scripts).\n\nYou could come up with a patch series that first starts emitting\nwarnings whenever the user asks for behavior that will change, and later\nflips the default and removes the warning (the latter would be merged\nfor 2.0 or so).\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"214737","messageId":"7vvc7j7nut.fsf@alter.siamese.dyndns.org","threadId":"33537","inReplyTo":"87k3nzx6dn.fsf@linux-k42r.v.cablecom.net","subject":"Re: Bug with rev-list --reverse?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-18T17:25:14Z","receivedAt":"2013-04-18T17:25:14Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@inf.ethz.ch> writes:\n\n> You could come up with a patch series that first starts emitting\n> warnings whenever the user asks for behavior that will change, and later\n> flips the default and removes the warning (the latter would be merged\n> for 2.0 or so).\n\nPlease don't.  The fact that \"reverse then count\" mode may be useful\ndoes not mean \"count then show in reverse\" mode does not have any\nuse. \"git log --oneline --reverse -20\" is a very valid way to ask\n\"what did I do recently\" and get \"you did this, that and then...\" in\nthat order.\n\nAdding a new option can be done anytime without any complex\ntransition plan.  You may want to introduce a --show-in-reverse\nsynonym to the current --reverse when you add the new mode of\nreversing (--reverse-before-count?) so that eventually we won't have\nto ask \"which kind of reverse an unadorned --reverse option mean?\"\nby deprecating a plain \"--reverse\", though.\n"}]}