{"thread":{"id":"37772","subject":"git reflog --date","startedAt":"2014-10-21T08:11:50Z","lastAt":"2014-11-04T17:06:23Z","messageCount":8,"participants":["John Tapsell","Junio C Hamano","Phil Hord"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"250889","messageId":"CAHQ6N+oQV8Uesv_eCBZc+hpwR5rDWA22OXR05AJ_zXcf7bfQ7g@mail.gmail.com","threadId":"37772","inReplyTo":null,"subject":"git reflog --date","fromName":"John Tapsell","fromEmail":"johnflux@gmail.com","sentAt":"2014-10-21T08:11:50Z","receivedAt":"2014-10-21T08:11:50Z","isPatch":false,"sender":{"key":"johnflux@gmail.com","avatar":"https://gravatar.com/avatar/25f70d4c0f96396b84a2e34bcd9bdc233462c7b4be29b5fdca8266fc53f30b0c?d=mp&s=160"},"body":"Hi all,\n\n  Could we add a default to \"--date\" so that:\n\ngit reflog --date\n\njust works?  (Currently you need to do:   git reflog --date=iso)  It\nshould probably obey the default in log.date?\n\nAlso, could we add this \"--date\" option to the man page please?  It's\nan extremely useful option to know.  At the moment you have to notice\nthe comment that \"all normal log options\" are there, and then try to\nwork it out from there etc.\n\nThank you,\n\nJohn\n\nJohn\n"},{"id":"250898","messageId":"xmqqh9yx1gkt.fsf@gitster.dls.corp.google.com","threadId":"37772","inReplyTo":"CAHQ6N+oQV8Uesv_eCBZc+hpwR5rDWA22OXR05AJ_zXcf7bfQ7g@mail.gmail.com","subject":"Re: git reflog --date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-21T17:24:34Z","receivedAt":"2014-10-21T17:24:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Tapsell <johnflux@gmail.com> writes:\n\n> Hi all,\n>\n>   Could we add a default to \"--date\" so that:\n>\n> git reflog --date\n>\n> just works?  (Currently you need to do:   git reflog --date=iso)  It\n> should probably obey the default in log.date?\n\nHmph.  \"--date=<style>\" is not the way to choose between timed and\ncounted output in the first place, though.\n\nIn a similar way that \"git log -g @{now}\" and \"git log -g @{0}\"\nswitch between two, \"git reflog @{now}\" and \"git reflog @{0}\" have\nbeen the primary way to choose between them.  Only because it is\nclear that you want the timed format when you specify any date style\ne.g. \"git reflog --date=relative\", we give timed output without\n@{<time>/<number>} but that is just icing on the cake.\n\nThat at least is why things are the way they are.  And once you\nunderstand the above, you would understand why \"--date=<style>\" is\nnot singled out as a useful option in the documentation, because\nthat is not a primary way to choose between timed and counted\noutput, but because it is merely a way to influence how times are\nshown once you chose timed output.\n\nHaving said all that, I have a few comments:\n\n - Perhaps use of @{<time>} vs @{<count>} as _the_ way to choose\n   between timed and counted output is not documented clearly enough\n   to lead to such a misunderstanding?\n\n - Perhaps use of @{<time>} vs @{<count>} is a less intuitive than\n   ideal way to choose between them in the first place?\n\n - Perhaps adding --date with no date-style specification as another\n   way to trigger \"You said 'date' so you must mean you want timed\n   output\" heuristics just like existing \"--date=<style>\" does may\n   let us get away without answering the above two questions,\n   sidestepping the issues?\n\nI dunno.\n"},{"id":"250900","messageId":"CAHQ6N+rb6eNC0_uzCAdH-HNb_SmdG4-W9DgmVKjfNpRcKKxk=w@mail.gmail.com","threadId":"37772","inReplyTo":"xmqqh9yx1gkt.fsf@gitster.dls.corp.google.com","subject":"Re: git reflog --date","fromName":"John Tapsell","fromEmail":"johnflux@gmail.com","sentAt":"2014-10-21T17:31:42Z","receivedAt":"2014-10-21T17:31:42Z","isPatch":false,"sender":{"key":"johnflux@gmail.com","avatar":"https://gravatar.com/avatar/25f70d4c0f96396b84a2e34bcd9bdc233462c7b4be29b5fdca8266fc53f30b0c?d=mp&s=160"},"body":"For me, writing \"git reflog @{now}\"  is a lot less intuitive than \"git\nreflog --date\"\n\nCurrently the top google search for this question is here:\n\nhttp://stackoverflow.com/questions/17369254/is-there-a-way-to-cause-git-reflog-to-show-a-date-alongside-each-entry\n\nWhich doesn't mention \"@{now}\"   at all.\n\nMy opinion:\n\n1. Add --date   as an option to reflog.  Perhaps using the log.date\nformat as the default.\n2. Document --date in the man page for \"git reflog\"\n3. Document @{now}  in the man page for \"git reflog\"\n\nSound good?\n\nJohn\n\nOn 21 October 2014 18:24, Junio C Hamano <gitster@pobox.com> wrote:\n> John Tapsell <johnflux@gmail.com> writes:\n>\n>> Hi all,\n>>\n>>   Could we add a default to \"--date\" so that:\n>>\n>> git reflog --date\n>>\n>> just works?  (Currently you need to do:   git reflog --date=iso)  It\n>> should probably obey the default in log.date?\n>\n> Hmph.  \"--date=<style>\" is not the way to choose between timed and\n> counted output in the first place, though.\n>\n> In a similar way that \"git log -g @{now}\" and \"git log -g @{0}\"\n> switch between two, \"git reflog @{now}\" and \"git reflog @{0}\" have\n> been the primary way to choose between them.  Only because it is\n> clear that you want the timed format when you specify any date style\n> e.g. \"git reflog --date=relative\", we give timed output without\n> @{<time>/<number>} but that is just icing on the cake.\n>\n> That at least is why things are the way they are.  And once you\n> understand the above, you would understand why \"--date=<style>\" is\n> not singled out as a useful option in the documentation, because\n> that is not a primary way to choose between timed and counted\n> output, but because it is merely a way to influence how times are\n> shown once you chose timed output.\n>\n> Having said all that, I have a few comments:\n>\n>  - Perhaps use of @{<time>} vs @{<count>} as _the_ way to choose\n>    between timed and counted output is not documented clearly enough\n>    to lead to such a misunderstanding?\n>\n>  - Perhaps use of @{<time>} vs @{<count>} is a less intuitive than\n>    ideal way to choose between them in the first place?\n>\n>  - Perhaps adding --date with no date-style specification as another\n>    way to trigger \"You said 'date' so you must mean you want timed\n>    output\" heuristics just like existing \"--date=<style>\" does may\n>    let us get away without answering the above two questions,\n>    sidestepping the issues?\n>\n> I dunno.\n"},{"id":"250902","messageId":"xmqq8uk91emg.fsf@gitster.dls.corp.google.com","threadId":"37772","inReplyTo":"CAHQ6N+rb6eNC0_uzCAdH-HNb_SmdG4-W9DgmVKjfNpRcKKxk=w@mail.gmail.com","subject":"Re: git reflog --date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-21T18:06:47Z","receivedAt":"2014-10-21T18:06:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Tapsell <johnflux@gmail.com> writes:\n\n> For me, writing \"git reflog @{now}\"  is a lot less intuitive than \"git\n> reflog --date\"\n>\n> Currently the top google search for this question is here:\n>\n> http://stackoverflow.com/questions/17369254/is-there-a-way-to-cause-git-reflog-to-show-a-date-alongside-each-entry\n>\n> Which doesn't mention \"@{now}\"   at all.\n\nI would say that a site where cluelesses attempt to lead other\ncluelesses is not the best source of information ;-), but that tells\nus that either our docs are not read by people or they do not give\nnecessary information to them clearly enough.\n\n> My opinion:\n>\n> 1. Add --date   as an option to reflog.  Perhaps using the log.date\n> format as the default.\n> 2. Document --date in the man page for \"git reflog\"\n> 3. Document @{now}  in the man page for \"git reflog\"\n>\n> Sound good?\n\nThe order of changes is questionable, but other than that, I think\nthat would be a good way forward.\n"},{"id":"250903","messageId":"CAHQ6N+qkQbmhY-nueF28+iRhbVvH__gihXb6yyj3dRbgpbV18g@mail.gmail.com","threadId":"37772","inReplyTo":"xmqq8uk91emg.fsf@gitster.dls.corp.google.com","subject":"Re: git reflog --date","fromName":"John Tapsell","fromEmail":"johnflux@gmail.com","sentAt":"2014-10-21T18:12:04Z","receivedAt":"2014-10-21T18:12:04Z","isPatch":false,"sender":{"key":"johnflux@gmail.com","avatar":"https://gravatar.com/avatar/25f70d4c0f96396b84a2e34bcd9bdc233462c7b4be29b5fdca8266fc53f30b0c?d=mp&s=160"},"body":"Great - now I just need to persuade someone very nice nicely.. :-)\n\nOn 21 October 2014 19:06, Junio C Hamano <gitster@pobox.com> wrote:\n> John Tapsell <johnflux@gmail.com> writes:\n>\n>> For me, writing \"git reflog @{now}\"  is a lot less intuitive than \"git\n>> reflog --date\"\n>>\n>> Currently the top google search for this question is here:\n>>\n>> http://stackoverflow.com/questions/17369254/is-there-a-way-to-cause-git-reflog-to-show-a-date-alongside-each-entry\n>>\n>> Which doesn't mention \"@{now}\"   at all.\n>\n> I would say that a site where cluelesses attempt to lead other\n> cluelesses is not the best source of information ;-), but that tells\n> us that either our docs are not read by people or they do not give\n> necessary information to them clearly enough.\n>\n>> My opinion:\n>>\n>> 1. Add --date   as an option to reflog.  Perhaps using the log.date\n>> format as the default.\n>> 2. Document --date in the man page for \"git reflog\"\n>> 3. Document @{now}  in the man page for \"git reflog\"\n>>\n>> Sound good?\n>\n> The order of changes is questionable, but other than that, I think\n> that would be a good way forward.\n"},{"id":"250953","messageId":"xmqqvbndhxnn.fsf@gitster.dls.corp.google.com","threadId":"37772","inReplyTo":"xmqq8uk91emg.fsf@gitster.dls.corp.google.com","subject":"Re: git reflog --date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-21T22:21:16Z","receivedAt":"2014-10-21T22:21:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> John Tapsell <johnflux@gmail.com> writes:\n>\n>> For me, writing \"git reflog @{now}\"  is a lot less intuitive than \"git\n>> reflog --date\"\n>>\n>> Currently the top google search for this question is here:\n>>\n>> http://stackoverflow.com/questions/17369254/is-there-a-way-to-cause-git-reflog-to-show-a-date-alongside-each-entry\n>>\n>> Which doesn't mention \"@{now}\"   at all.\n>\n> I would say that a site where cluelesses attempt to lead other\n> cluelesses is not the best source of information ;-), but that tells\n> us that either our docs are not read by people or they do not give\n> necessary information to them clearly enough.\n\nAnd it turns out it is a little bit of both.  We have this shown in\n\"git log --help\":\n\n    -g::\n    --walk-reflogs::\n    ...\n    By default, 'commit@\\{Nth}' notation is\n    used in the output.  When the starting commit is specified as\n    'commit@\\{now}', output also uses 'commit@\\{timestamp}' notation\n    instead.\n\nand \"git reflog --help\" says that \"It is an alias for git log -g\n--abbrev-commit --pretty=oneline; see git-log(1).\" in fairly early\npart of its description.\n"},{"id":"250955","messageId":"xmqqk33thvbo.fsf@gitster.dls.corp.google.com","threadId":"37772","inReplyTo":"CAHQ6N+qkQbmhY-nueF28+iRhbVvH__gihXb6yyj3dRbgpbV18g@mail.gmail.com","subject":"Re: git reflog --date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-21T23:11:39Z","receivedAt":"2014-10-21T23:11:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Tapsell <johnflux@gmail.com> writes:\n\n> On 21 October 2014 19:06, Junio C Hamano <gitster@pobox.com> wrote:\n>> John Tapsell <johnflux@gmail.com> writes:\n>>\n>>> For me, writing \"git reflog @{now}\"  is a lot less intuitive than \"git\n>>> reflog --date\"\n>>>\n>>> Currently the top google search for this question is here:\n>>>\n>>> http://stackoverflow.com/questions/17369254/is-there-a-way-to-cause-git-reflog-to-show-a-date-alongside-each-entry\n>>>\n>>> Which doesn't mention \"@{now}\"   at all.\n>>\n>> I would say that a site where cluelesses attempt to lead other\n>> cluelesses is not the best source of information ;-), but that tells\n>> us that either our docs are not read by people or they do not give\n>> necessary information to them clearly enough.\n>>\n>>> My opinion:\n>>>\n>>> 1. Add --date   as an option to reflog.  Perhaps using the log.date\n>>> format as the default.\n>>> 2. Document --date in the man page for \"git reflog\"\n>>> 3. Document @{now}  in the man page for \"git reflog\"\n>>>\n>>> Sound good?\n>>\n>> The order of changes is questionable, but other than that, I think\n>> that would be a good way forward.\n>\n> Great - now I just need to persuade someone very nice nicely.. :-)\n\nYou should note that #1 is unworkable, as it would make:\n\n    $ git log -g --date default\n\nambiguous.  Is it asking the timed reflog output using log.date\nformat on the \"default\" branch, or is it asking the timed reflog\noutput using the \"default\" time format on the HEAD?\n\nYou would need to disambiguate by\n\n    $ git log -g --date -- default ;# on default branch\n    $ git log -g --date default -- ;# using default time format\n\nor something, which means --date can be the last dashed option on\nthe command line, and also you close the door for us to ever add\nanother dashed command line option that takes an optional argument.\n\nSo the best you could do is\n\n    1. Add document commit@{timestamp} vs commit@{count} notation\n       we have for \"git log\" also to \"git reflog\", perhaps?\n\n    2. Document --date=<style> (but not --date alone) as a way to\n       trigger timed output for reflog entries, and refer to that\n       from \"--walk-reflogs\" option description as \"see also\".\n\n\n\n \n"},{"id":"251376","messageId":"CABURp0oHYtnv1hB12XVssjppCkZOpSR2xsZmYR=Etu=sTT0nXg@mail.gmail.com","threadId":"37772","inReplyTo":"xmqqh9yx1gkt.fsf@gitster.dls.corp.google.com","subject":"Re: git reflog --date","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2014-11-04T17:06:23Z","receivedAt":"2014-11-04T17:06:23Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Tue, Oct 21, 2014 at 1:24 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> John Tapsell <johnflux@gmail.com> writes:\n>\n>> Hi all,\n>>\n>>   Could we add a default to \"--date\" so that:\n>>\n>> git reflog --date\n>>\n>> just works?  (Currently you need to do:   git reflog --date=iso)  It\n>> should probably obey the default in log.date?\n>\n> Hmph.  \"--date=<style>\" is not the way to choose between timed and\n> counted output in the first place, though.\n\nOf course not.  I always use --relative-date for this.\n"}]}