{"thread":{"id":"18404","subject":"Gnome chose Git","startedAt":"2009-03-19T11:23:32Z","lastAt":"2009-03-20T20:03:46Z","messageCount":21,"participants":["Teemu Likonen","Sverre Rabbelier","Mike Ralphson","Michael J Gruber","Pat Notz","Shawn O. Pearce","Andreas Ericsson","Jeff King","demerphq","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"108519","messageId":"877i2lbvt7.fsf@iki.fi","threadId":"18404","inReplyTo":null,"subject":"Gnome chose Git","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2009-03-19T11:23:32Z","receivedAt":"2009-03-19T11:23:32Z","isPatch":false,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"FYI: The Gnome release team just announced that Gnome will migrate from\nSubversion to Git:\n\n    http://thread.gmane.org/gmane.comp.gnome.infrastructure/1134\n"},{"id":"108520","messageId":"fabb9a1e0903190429r2fda9d1fobebbe146a001f876@mail.gmail.com","threadId":"18404","inReplyTo":"877i2lbvt7.fsf@iki.fi","subject":"Re: Gnome chose Git","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-03-19T11:29:16Z","receivedAt":"2009-03-19T11:29:16Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Thu, Mar 19, 2009 at 12:23, Teemu Likonen <tlikonen@iki.fi> wrote:\n> FYI: The Gnome release team just announced that Gnome will migrate from\n> Subversion to Git:\n>\n>    http://thread.gmane.org/gmane.comp.gnome.infrastructure/1134\n\nSweet, now how long until my university starts offering git hosting\nand my fellow students start using it in their projects? :P\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"108521","messageId":"e2b179460903190433l3619e09aj47490a6e3b10d42d@mail.gmail.com","threadId":"18404","inReplyTo":"877i2lbvt7.fsf@iki.fi","subject":"Re: Gnome chose Git","fromName":"Mike Ralphson","fromEmail":"mike.ralphson@gmail.com","sentAt":"2009-03-19T11:33:54Z","receivedAt":"2009-03-19T11:33:54Z","isPatch":false,"sender":{"key":"mike.ralphson@gmail.com","avatar":"https://avatars.githubusercontent.com/u/21603?v=4"},"body":"2009/3/19 Teemu Likonen <tlikonen@iki.fi>:\n> FYI: The Gnome release team just announced that Gnome will migrate from\n> Subversion to Git:\n>\n>    http://thread.gmane.org/gmane.comp.gnome.infrastructure/1134\n\nThere does seem to be a typo in the release though.\n\n\"We realize that git is not perfect, and that the transition will\nrequire significant and important changes to many GNOME processes.\"\n\ns/ not//\n\nThere, fixed that.\n\nSeriously, they should be advocating a c) there, contributing\nimprovements back to git (and whichever svn migration tool they used)\nfor the benefit of all, which I'm sure we'll see.\n\nMike\n"},{"id":"108525","messageId":"49C249B9.7010001@drmicha.warpmail.net","threadId":"18404","inReplyTo":"877i2lbvt7.fsf@iki.fi","subject":"Re: Gnome chose Git","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-03-19T13:33:45Z","receivedAt":"2009-03-19T13:33:45Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Teemu Likonen venit, vidit, dixit 19.03.2009 12:23:\n> FYI: The Gnome release team just announced that Gnome will migrate from\n> Subversion to Git:\n> \n>     http://thread.gmane.org/gmane.comp.gnome.infrastructure/1134\n\nGood choice :)\n\nInterestingly, they seem to go the svn-all-fast-export route.\n\nAlso, they need push tracking for pushing through ssh, which is a common\nrequirement for many large projects. Do we have something to support\nthat? git-notes comes to my mind.\n\nTheir current approach is writing to a single log file (receive-hook).\nThat may support a linear push history best, but looking up who pushed\nwhat, given \"what\"?\n\nMichael\n"},{"id":"108527","messageId":"1cd1989b0903190701uac4602dl1d2c3cace45a9938@mail.gmail.com","threadId":"18404","inReplyTo":"49C24D9B.1060301@drmicha.warpmail.net","subject":"Re: Gnome chose Git","fromName":"Pat Notz","fromEmail":"patnotz@gmail.com","sentAt":"2009-03-19T14:01:32Z","receivedAt":"2009-03-19T14:01:32Z","isPatch":false,"sender":{"key":"patnotz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45364?v=4"},"body":"On Thu, Mar 19, 2009 at 7:50 AM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> Pat Notz venit, vidit, dixit 19.03.2009 14:43:\n>> On Thu, Mar 19, 2009 at 7:33 AM, Michael J Gruber\n>> <git@drmicha.warpmail.net> wrote:\n>>> Teemu Likonen venit, vidit, dixit 19.03.2009 12:23:\n>>>> FYI: The Gnome release team just announced that Gnome will migrate from\n>>>> Subversion to Git:\n>>>>\n>>>>     http://thread.gmane.org/gmane.comp.gnome.infrastructure/1134\n>>>\n>>> Good choice :)\n>>>\n>>> Interestingly, they seem to go the svn-all-fast-export route.\n>>>\n>>> Also, they need push tracking for pushing through ssh, which is a common\n>>> requirement for many large projects. Do we have something to support\n>>> that? git-notes comes to my mind.\n>>>\n>>> Their current approach is writing to a single log file (receive-hook).\n>>> That may support a linear push history best, but looking up who pushed\n>>> what, given \"what\"?\n>>>\n>>\n>> That's also something we do.  Since the post-receive hook gives you\n>> the refname and the old and new refs you should have everything you\n>> need.  We basically record the user name, UTC timestamp and the ref\n>> info.  With a little bit more scripting you should be able to figure\n>> everything else out (though post-receive isn't called for local\n>> commits).\n>>\n>\n> I know the info is there. It might just make more sense to have it in\n> the git repo the way notes are/will be: It's public, it's connected to\n> the commits, it's tamper proof (anyone would notice rewrites).\n>\n\nAhh, yes.  We'd like that too.\n\n> Michael\n>\n> P.S.: Was this intentionally off-list? Just in case I respected it.\n>\n\nOops, sorry about that.  Fixed.\n"},{"id":"108537","messageId":"20090319151610.GO23521@spearce.org","threadId":"18404","inReplyTo":"1cd1989b0903190701uac4602dl1d2c3cace45a9938@mail.gmail.com","subject":"Re: Gnome chose Git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-19T15:16:10Z","receivedAt":"2009-03-19T15:16:10Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Pat Notz <patnotz@gmail.com> wrote:\n> On Thu, Mar 19, 2009 at 7:50 AM, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n> > Pat Notz venit, vidit, dixit 19.03.2009 14:43:\n> >> On Thu, Mar 19, 2009 at 7:33 AM, Michael J Gruber\n> >> <git@drmicha.warpmail.net> wrote:\n> >>>\n> >>> Also, they need push tracking for pushing through ssh, which is a common\n> >>> requirement for many large projects. Do we have something to support\n> >>> that? git-notes comes to my mind.\n> >>>\n> >>> Their current approach is writing to a single log file (receive-hook).\n> >>> That may support a linear push history best, but looking up who pushed\n> >>> what, given \"what\"?\n> >>\n> >> That's also something we do. ?Since the post-receive hook gives you\n> >> the refname and the old and new refs you should have everything you\n> >> need. ?We basically record the user name, UTC timestamp and the ref\n> >> info. ?With a little bit more scripting you should be able to figure\n> >> everything else out (though post-receive isn't called for local\n> >> commits).\n\nWhy are people reinventing the reflog, and core.logallrefupdates ?\n\n> > I know the info is there. It might just make more sense to have it in\n> > the git repo the way notes are/will be: It's public, it's connected to\n> > the commits, it's tamper proof (anyone would notice rewrites).\n> \n> Ahh, yes.  We'd like that too.\n\nEclipse is also talking about Git, and has a similar problem.\n\nAnytime you start talking about \"who put what\" though, you get into a\n\"where, and why does it matter?\"\n\nImagine you are Eclipse Foundation or GNOME, you need to know which\nauthorized developer put the code on your servers.\n\nBut imagine you are an ISV like Oracle or IBM and you consume\ncode from the upstream project (Eclipse), put it on your servers,\nadd some \"extra sauce\", and distribute the result in some form.\nWho put what on the Eclipse server isn't relevant, but what employee\nyour clone to use 3.4.1 instead of 3.4.0 matters a whole lot more.\nFor the most part, you just trust the upstream to do their own\nIP tracking and diligence, as they have the contributor license\nagreements, and you don't.\n\nIts a thorny problem.  We've talked about trying to add some sort\nof GnuPG signature into a push stream (for example) to allow the\nserver to store a record of who-did-what-when and later distribute\nthat back.\n\n  http://thread.gmane.org/gmane.comp.version-control.git/71849\n\n-- \nShawn.\n"},{"id":"108542","messageId":"1cd1989b0903190850p1a08991y754904e7799c7879@mail.gmail.com","threadId":"18404","inReplyTo":"20090319151610.GO23521@spearce.org","subject":"Re: Gnome chose Git","fromName":"Pat Notz","fromEmail":"patnotz@gmail.com","sentAt":"2009-03-19T15:50:39Z","receivedAt":"2009-03-19T15:50:39Z","isPatch":false,"sender":{"key":"patnotz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45364?v=4"},"body":"On Thu, Mar 19, 2009 at 9:16 AM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>\n> Why are people reinventing the reflog, and core.logallrefupdates ?\n>\n\nHmmm, lack of awareness of core.logallrefupdates in my case.  Thanks\nfor the pointer.\n\n~ Pat\n"},{"id":"108546","messageId":"49C272F8.3070506@op5.se","threadId":"18404","inReplyTo":"e2b179460903190433l3619e09aj47490a6e3b10d42d@mail.gmail.com","subject":"Re: Gnome chose Git","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2009-03-19T16:29:44Z","receivedAt":"2009-03-19T16:29:44Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Mike Ralphson wrote:\n> 2009/3/19 Teemu Likonen <tlikonen@iki.fi>:\n>> FYI: The Gnome release team just announced that Gnome will migrate from\n>> Subversion to Git:\n>>\n>>    http://thread.gmane.org/gmane.comp.gnome.infrastructure/1134\n> \n> There does seem to be a typo in the release though.\n> \n> \"We realize that git is not perfect, and that the transition will\n> require significant and important changes to many GNOME processes.\"\n> \n> s/ not//\n> \n> There, fixed that.\n> \n> Seriously, they should be advocating a c) there, contributing\n> improvements back to git (and whichever svn migration tool they used)\n> for the benefit of all, which I'm sure we'll see.\n> \n\nKristian Högsberg played a rather significant part in the migration\nprocess. Since he's an old git contributor, he'll almost certainly\nsee to it that improvements are made available to core git.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"108578","messageId":"20090319201405.GD17028@coredump.intra.peff.net","threadId":"18404","inReplyTo":"1cd1989b0903190850p1a08991y754904e7799c7879@mail.gmail.com","subject":"Re: Gnome chose Git","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-19T20:14:06Z","receivedAt":"2009-03-19T20:14:06Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 19, 2009 at 09:50:39AM -0600, Pat Notz wrote:\n\n> On Thu, Mar 19, 2009 at 9:16 AM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> >\n> > Why are people reinventing the reflog, and core.logallrefupdates ?\n> >\n> \n> Hmmm, lack of awareness of core.logallrefupdates in my case.  Thanks\n> for the pointer.\n\nBut do note that reflogs expire eventually, so you will want to also\nlook at gc.reflogexpire and gc.reflogexpireunreachable if you want to\nkeep this as an activity log forever.\n\n-Peff\n"},{"id":"108588","messageId":"9b18b3110903191440w20ca9801pfb218cc4b10ea769@mail.gmail.com","threadId":"18404","inReplyTo":"20090319201405.GD17028@coredump.intra.peff.net","subject":"Re: Gnome chose Git","fromName":"demerphq","fromEmail":"demerphq@gmail.com","sentAt":"2009-03-19T21:40:39Z","receivedAt":"2009-03-19T21:40:39Z","isPatch":false,"sender":{"key":"demerphq@gmail.com","avatar":null},"body":"2009/3/19 Jeff King <peff@peff.net>:\n> On Thu, Mar 19, 2009 at 09:50:39AM -0600, Pat Notz wrote:\n>\n>> On Thu, Mar 19, 2009 at 9:16 AM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>> >\n>> > Why are people reinventing the reflog, and core.logallrefupdates ?\n>> >\n>>\n>> Hmmm, lack of awareness of core.logallrefupdates in my case.  Thanks\n>> for the pointer.\n>\n> But do note that reflogs expire eventually, so you will want to also\n> look at gc.reflogexpire and gc.reflogexpireunreachable if you want to\n> keep this as an activity log forever.\n\nOutside of parsing the reflog directly, (which feels wrong and dirty\nto me), how does one find out the times that a reflog entry was\ncreated?\n\nThe closest thing i could find was git log -g, but that shows the time\nof the commit that was switched to, not the time the reflog entry was\ncreated. I dont see a --format pattern for it, and there doesnt seem\nto be a switch to git reflog to do it. (I had initially (before\nRTFM'ing) assumed that git reflog -v would show the times, but\napparently not).\n\nIf the times were easy to access then it would be much more useful as\na general logging facility.\n\ncheers,\nYves\n\n\n\n\n-- \nperl -Mre=debug -e \"/just|another|perl|hacker/\"\n"},{"id":"108590","messageId":"20090319214317.GU23521@spearce.org","threadId":"18404","inReplyTo":"9b18b3110903191440w20ca9801pfb218cc4b10ea769@mail.gmail.com","subject":"Re: Gnome chose Git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-19T21:43:17Z","receivedAt":"2009-03-19T21:43:17Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"demerphq <demerphq@gmail.com> wrote:\n> Outside of parsing the reflog directly, (which feels wrong and dirty\n> to me), how does one find out the times that a reflog entry was\n> created?\n> \n> The closest thing i could find was git log -g, but that shows the time\n\n  git reflog -g branch@{now}\n\nthe @{now} suffix is the magic to make it show the time.\n\n-- \nShawn.\n"},{"id":"108592","messageId":"20090319214432.GV23521@spearce.org","threadId":"18404","inReplyTo":"20090319214317.GU23521@spearce.org","subject":"Re: Gnome chose Git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-19T21:44:32Z","receivedAt":"2009-03-19T21:44:32Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> demerphq <demerphq@gmail.com> wrote:\n> > Outside of parsing the reflog directly, (which feels wrong and dirty\n> > to me), how does one find out the times that a reflog entry was\n> > created?\n> > \n> > The closest thing i could find was git log -g, but that shows the time\n> \n>   git reflog -g branch@{now}\n\nArrgh, I of course actually meant\n\n    git log -g branch@{now}\n \n> the @{now} suffix is the magic to make it show the time.\n\n-- \nShawn.\n"},{"id":"108593","messageId":"9b18b3110903191448x4cd62306idae9ce70630a389d@mail.gmail.com","threadId":"18404","inReplyTo":"20090319214317.GU23521@spearce.org","subject":"Re: Gnome chose Git","fromName":"demerphq","fromEmail":"demerphq@gmail.com","sentAt":"2009-03-19T21:48:51Z","receivedAt":"2009-03-19T21:48:51Z","isPatch":false,"sender":{"key":"demerphq@gmail.com","avatar":null},"body":"2009/3/19 Shawn O. Pearce <spearce@spearce.org>:\n> demerphq <demerphq@gmail.com> wrote:\n>> Outside of parsing the reflog directly, (which feels wrong and dirty\n>> to me), how does one find out the times that a reflog entry was\n>> created?\n>>\n>> The closest thing i could find was git log -g, but that shows the time\n>\n>  git reflog -g branch@{now}\n>\n> the @{now} suffix is the magic to make it show the time.\n\nAh cool. Its not documented but that at least would have sorted my\nimmediate needs.\n\nBut for a logging tool it would be nice to get something like:\n\n2009-03-19 21:46 > de9b652... HEAD@{0}: commit: pod/perlreftut.pod:\nkeep example in tune with the times\n2009-03-19 21:44 > 53102b2... HEAD@{1}: HEAD^: updating HEAD\n2009-03-19 21:40 > a9a8f59... HEAD@{2}: commit: must stay contemporary\n\ninstead of:\n\n$ git reflog -g HEAD@{now}\nde9b652... HEAD@{57 minutes ago}: commit: pod/perlreftut.pod: keep\nexample in tune with the times\n53102b2... HEAD@{61 minutes ago}: HEAD^: updating HEAD\na9a8f59... HEAD@{61 minutes ago}: commit: must stay contemporary\n\nBut thanks a lot for the info. I take this is documented in a newer\nrelease than i currently have?\n\nYves\n\n\n\n\n\n-- \nperl -Mre=debug -e \"/just|another|perl|hacker/\"\n"},{"id":"108595","messageId":"9b18b3110903191451u56bbee7biac3a1fee4a36b71d@mail.gmail.com","threadId":"18404","inReplyTo":"20090319214432.GV23521@spearce.org","subject":"Re: Gnome chose Git","fromName":"demerphq","fromEmail":"demerphq@gmail.com","sentAt":"2009-03-19T21:51:01Z","receivedAt":"2009-03-19T21:51:01Z","isPatch":false,"sender":{"key":"demerphq@gmail.com","avatar":null},"body":"2009/3/19 Shawn O. Pearce <spearce@spearce.org>:\n> \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n>> demerphq <demerphq@gmail.com> wrote:\n>> > Outside of parsing the reflog directly, (which feels wrong and dirty\n>> > to me), how does one find out the times that a reflog entry was\n>> > created?\n>> >\n>> > The closest thing i could find was git log -g, but that shows the time\n>>\n>>   git reflog -g branch@{now}\n>\n> Arrgh, I of course actually meant\n>\n>    git log -g branch@{now}\n>\n>> the @{now} suffix is the magic to make it show the time.\n\nAh! Much nicer! Thanks.\n\nIs there by any chance any way to set the date format it uses to\nsomething more suitable for machine processing?\n\nYves\n\n-- \nperl -Mre=debug -e \"/just|another|perl|hacker/\"\n"},{"id":"108596","messageId":"20090319215331.GW23521@spearce.org","threadId":"18404","inReplyTo":"9b18b3110903191451u56bbee7biac3a1fee4a36b71d@mail.gmail.com","subject":"Re: Gnome chose Git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-19T21:53:31Z","receivedAt":"2009-03-19T21:53:31Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"demerphq <demerphq@gmail.com> wrote:\n> 2009/3/19 Shawn O. Pearce <spearce@spearce.org>:\n> > \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> >\n> > git log -g branch@{now}\n> \n> Ah! Much nicer! Thanks.\n> \n> Is there by any chance any way to set the date format it uses to\n> something more suitable for machine processing?\n\nI don't think so.  If you want to machine process it, why not\njust read the reflog directly?  Its a really simple format.\n\n-- \nShawn.\n"},{"id":"108598","messageId":"9b18b3110903191459q23af2bf9q998de27feb8dae2a@mail.gmail.com","threadId":"18404","inReplyTo":"20090319215331.GW23521@spearce.org","subject":"Re: Gnome chose Git","fromName":"demerphq","fromEmail":"demerphq@gmail.com","sentAt":"2009-03-19T21:59:08Z","receivedAt":"2009-03-19T21:59:08Z","isPatch":false,"sender":{"key":"demerphq@gmail.com","avatar":null},"body":"2009/3/19 Shawn O. Pearce <spearce@spearce.org>:\n> demerphq <demerphq@gmail.com> wrote:\n>> 2009/3/19 Shawn O. Pearce <spearce@spearce.org>:\n>> > \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n>> >\n>> > git log -g branch@{now}\n>>\n>> Ah! Much nicer! Thanks.\n>>\n>> Is there by any chance any way to set the date format it uses to\n>> something more suitable for machine processing?\n>\n> I don't think so.  If you want to machine process it, why not\n> just read the reflog directly?  Its a really simple format.\n\nMostly my problem with that is that it violates the abstraction. If i\nupdate git and the reflog format changes my script breaks. I dont\nnecessarily know where it will be located, etc. And while no doubt i\ncan reverse engineer the format, well, who knows maybe Ill miss\nsomething important, I mean is it documented anywhere?\n\nSo i guess if the format were documented (and thus changing it would\nbreak compatibility and be noted in the changes file) then it would be\nfine to do so, but it seems to me making a way to access the reflog\ndata in a structured way via a plumbing level command makes more\nsense. (At the very least this abstract the user of having to figure\nout where the log is stored).\n\nYves\n\n\n\n\n-- \nperl -Mre=debug -e \"/just|another|perl|hacker/\"\n"},{"id":"108614","messageId":"alpine.DEB.1.00.0903200017340.10279@pacific.mpi-cbg.de","threadId":"18404","inReplyTo":"9b18b3110903191451u56bbee7biac3a1fee4a36b71d@mail.gmail.com","subject":"Re: Gnome chose Git","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-19T23:17:39Z","receivedAt":"2009-03-19T23:17:39Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 19 Mar 2009, demerphq wrote:\n\n> 2009/3/19 Shawn O. Pearce <spearce@spearce.org>:\n> > \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> >> demerphq <demerphq@gmail.com> wrote:\n> >> > Outside of parsing the reflog directly, (which feels wrong and dirty\n> >> > to me), how does one find out the times that a reflog entry was\n> >> > created?\n> >> >\n> >> > The closest thing i could find was git log -g, but that shows the time\n> >>\n> >>   git reflog -g branch@{now}\n> >\n> > Arrgh, I of course actually meant\n> >\n> >    git log -g branch@{now}\n> >\n> >> the @{now} suffix is the magic to make it show the time.\n> \n> Ah! Much nicer! Thanks.\n> \n> Is there by any chance any way to set the date format it uses to\n> something more suitable for machine processing?\n\ngit log --date=$FORMAT -g branch\n\nHth,\nDscho\n"},{"id":"108652","messageId":"20090320052802.GA27714@coredump.intra.peff.net","threadId":"18404","inReplyTo":"20090319214317.GU23521@spearce.org","subject":"Re: Gnome chose Git","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-20T05:28:02Z","receivedAt":"2009-03-20T05:28:02Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 19, 2009 at 02:43:17PM -0700, Shawn O. Pearce wrote:\n\n> demerphq <demerphq@gmail.com> wrote:\n> > Outside of parsing the reflog directly, (which feels wrong and dirty\n> > to me), how does one find out the times that a reflog entry was\n> > created?\n> > \n> > The closest thing i could find was git log -g, but that shows the time\n> \n>   git reflog -g branch@{now}\n> \n> the @{now} suffix is the magic to make it show the time.\n\nYuck. It would be nice to just have a \"Reflog date\" header that you\ncould depend on, like:\n\ndiff --git a/reflog-walk.c b/reflog-walk.c\nindex f751fdc..cb7c66b 100644\n--- a/reflog-walk.c\n+++ b/reflog-walk.c\n@@ -269,6 +269,8 @@ void show_reflog_message(struct reflog_walk_info* info, int oneline,\n \t\t\t\t       - 2 - commit_reflog->recno);\n \t\t\tprintf(\"} (%s)\\nReflog message: %s\",\n \t\t\t       info->email, info->message);\n+\t\t\tprintf(\"Reflog date: %s\\n\",\n+\t\t\t\tshow_date(info->timestamp, info->tz, relative_date));\n \t\t}\n \t}\n }\n\nThen you could just do:\n\n  $ git log --date=raw -g\n\nLooking at making this trivial patch, though, it seems there is a bug\nwith the relative_date parameter. It is really a date_mode enum. In the\nmulti-line format, we feed it to show_date. But in the oneline mode, we\nuse it to decide whether to show the date, but then always pass the\n\"relative\" date mode. So you get:\n\n  $ git log --oneline -g origin/master | head -n 1\n  e986ceb refs/remotes/origin/master@{0}: fetch origin: fast forward\n  $ git log --oneline -g --date=relative origin/master | head -n 1\n  e986ceb refs/remotes/origin/master@{2 days ago}: fetch origin: fast forward\n  $ git log --oneline -g --date=raw origin/master | head -n 1\n  e986ceb refs/remotes/origin/master@{2 days ago}: fetch origin: fast forward\n\nHmm. It seems to drop the TZ, too. I'll whip up a patch.\n\nI guess my original \"extra reflog header\" isn't terribly useful, then:\nyou can always just pass --date=raw and parse it from the branch@{}\nsyntax.\n\n-Peff\n"},{"id":"108654","messageId":"20090320060043.GA27008@coredump.intra.peff.net","threadId":"18404","inReplyTo":"20090320052802.GA27714@coredump.intra.peff.net","subject":"[PATCH] make oneline reflog dates more consistent with multiline format","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-20T06:00:43Z","receivedAt":"2009-03-20T06:00:43Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The multiline reflog format (e.g., as shown by \"git log -g\")\nwill show HEAD@{<date>} rather than HEAD@{<count>} in two\nsituations:\n\n  1. If the user gave branch@{<date>} syntax to specify the\n     reflog\n\n  2. If the user gave a --date=<format> specifier\n\nIt uses the \"normal\" date format in case 1, and the\nuser-specified format in case 2.\n\nThe oneline reflog format (e.g., \"git reflog show\" or \"git\nlog -g --oneline\") will show the date in the same two\ncircumstances. However, it _always_ shows the date as a\nrelative date, and it always ignores the timezone.\n\nIn case 2, it seems ridiculous to trigger the date but use a\nformat totally different from what the user requested.\n\nFor case 1, it is arguable that the user might want to see\nthe relative date by default; however, the multiline version\nshows the normal format.\n\nThis patch does three things:\n\n  - refactors the \"relative_date\" parameter to\n    show_reflog_message to be an actual date_mode enum,\n    since this is how it is used (it is passed to show_date)\n\n  - uses the passed date_mode parameter in the oneline\n    format (making it consistent with the multiline format)\n\n  - does not ignore the timezone parameter in oneline mode\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n reflog-walk.c          |   12 +++++---\n reflog-walk.h          |    5 +++-\n t/t1411-reflog-show.sh |   67 ++++++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 78 insertions(+), 6 deletions(-)\n create mode 100755 t/t1411-reflog-show.sh\n\ndiff --git a/reflog-walk.c b/reflog-walk.c\nindex f751fdc..fd065f4 100644\n--- a/reflog-walk.c\n+++ b/reflog-walk.c\n@@ -242,7 +242,7 @@ void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit)\n }\n \n void show_reflog_message(struct reflog_walk_info* info, int oneline,\n-\tint relative_date)\n+\tenum date_mode dmode)\n {\n \tif (info && info->last_commit_reflog) {\n \t\tstruct commit_reflog *commit_reflog = info->last_commit_reflog;\n@@ -251,8 +251,10 @@ void show_reflog_message(struct reflog_walk_info* info, int oneline,\n \t\tinfo = &commit_reflog->reflogs->items[commit_reflog->recno+1];\n \t\tif (oneline) {\n \t\t\tprintf(\"%s@{\", commit_reflog->reflogs->ref);\n-\t\t\tif (commit_reflog->flag || relative_date)\n-\t\t\t\tprintf(\"%s\", show_date(info->timestamp, 0, 1));\n+\t\t\tif (commit_reflog->flag || dmode)\n+\t\t\t\tprintf(\"%s\", show_date(info->timestamp,\n+\t\t\t\t\t\t       info->tz,\n+\t\t\t\t\t\t       dmode));\n \t\t\telse\n \t\t\t\tprintf(\"%d\", commit_reflog->reflogs->nr\n \t\t\t\t       - 2 - commit_reflog->recno);\n@@ -260,10 +262,10 @@ void show_reflog_message(struct reflog_walk_info* info, int oneline,\n \t\t}\n \t\telse {\n \t\t\tprintf(\"Reflog: %s@{\", commit_reflog->reflogs->ref);\n-\t\t\tif (commit_reflog->flag || relative_date)\n+\t\t\tif (commit_reflog->flag || dmode)\n \t\t\t\tprintf(\"%s\", show_date(info->timestamp,\n \t\t\t\t\t\t\tinfo->tz,\n-\t\t\t\t\t\t\trelative_date));\n+\t\t\t\t\t\t\tdmode));\n \t\t\telse\n \t\t\t\tprintf(\"%d\", commit_reflog->reflogs->nr\n \t\t\t\t       - 2 - commit_reflog->recno);\ndiff --git a/reflog-walk.h b/reflog-walk.h\nindex 7ca1438..74c9096 100644\n--- a/reflog-walk.h\n+++ b/reflog-walk.h\n@@ -1,11 +1,14 @@\n #ifndef REFLOG_WALK_H\n #define REFLOG_WALK_H\n \n+#include \"cache.h\"\n+\n extern void init_reflog_walk(struct reflog_walk_info** info);\n extern int add_reflog_for_walk(struct reflog_walk_info *info,\n \t\tstruct commit *commit, const char *name);\n extern void fake_reflog_parent(struct reflog_walk_info *info,\n \t\tstruct commit *commit);\n-extern void show_reflog_message(struct reflog_walk_info *info, int, int);\n+extern void show_reflog_message(struct reflog_walk_info *info, int,\n+\t\tenum date_mode);\n \n #endif\ndiff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh\nnew file mode 100755\nindex 0000000..c18ed8e\n--- /dev/null\n+++ b/t/t1411-reflog-show.sh\n@@ -0,0 +1,67 @@\n+#!/bin/sh\n+\n+test_description='Test reflog display routines'\n+. ./test-lib.sh\n+\n+test_expect_success 'setup' '\n+\techo content >file &&\n+\tgit add file &&\n+\ttest_tick &&\n+\tgit commit -m one\n+'\n+\n+cat >expect <<'EOF'\n+Reflog: HEAD@{0} (C O Mitter <committer@example.com>)\n+Reflog message: commit (initial): one\n+EOF\n+test_expect_success 'log -g shows reflog headers' '\n+\tgit log -g -1 >tmp &&\n+\tgrep ^Reflog <tmp >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+cat >expect <<'EOF'\n+e46513e HEAD@{0}: commit (initial): one\n+EOF\n+test_expect_success 'oneline reflog format' '\n+\tgit log -g -1 --oneline >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+cat >expect <<'EOF'\n+Reflog: HEAD@{Thu Apr 7 15:13:13 2005 -0700} (C O Mitter <committer@example.com>)\n+Reflog message: commit (initial): one\n+EOF\n+test_expect_success 'using @{now} syntax shows reflog date (multiline)' '\n+\tgit log -g -1 HEAD@{now} >tmp &&\n+\tgrep ^Reflog <tmp >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+cat >expect <<'EOF'\n+e46513e HEAD@{Thu Apr 7 15:13:13 2005 -0700}: commit (initial): one\n+EOF\n+test_expect_success 'using @{now} syntax shows reflog date (oneline)' '\n+\tgit log -g -1 --oneline HEAD@{now} >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+cat >expect <<'EOF'\n+Reflog: HEAD@{1112911993 -0700} (C O Mitter <committer@example.com>)\n+Reflog message: commit (initial): one\n+EOF\n+test_expect_success 'using --date= shows reflog date (multiline)' '\n+\tgit log -g -1 --date=raw >tmp &&\n+\tgrep ^Reflog <tmp >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+cat >expect <<'EOF'\n+e46513e HEAD@{1112911993 -0700}: commit (initial): one\n+EOF\n+test_expect_success 'using --date= shows reflog date (oneline)' '\n+\tgit log -g -1 --oneline --date=raw >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_done\n-- \n1.6.2.1.342.gdbf4\n"},{"id":"108672","messageId":"49C354CC.2020108@drmicha.warpmail.net","threadId":"18404","inReplyTo":"20090319201405.GD17028@coredump.intra.peff.net","subject":"Re: Gnome chose Git","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-03-20T08:33:16Z","receivedAt":"2009-03-20T08:33:16Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jeff King venit, vidit, dixit 19.03.2009 21:14:\n> On Thu, Mar 19, 2009 at 09:50:39AM -0600, Pat Notz wrote:\n> \n>> On Thu, Mar 19, 2009 at 9:16 AM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>>>\n>>> Why are people reinventing the reflog, and core.logallrefupdates ?\n>>>\n>>\n>> Hmmm, lack of awareness of core.logallrefupdates in my case.  Thanks\n>> for the pointer.\n> \n> But do note that reflogs expire eventually, so you will want to also\n> look at gc.reflogexpire and gc.reflogexpireunreachable if you want to\n> keep this as an activity log forever.\n> \n> -Peff\n\nIn any case, reflogs are local. I would assume that accountability\ntracking should be public and transparent. Depends on the use case, of\ncourse.\n\nMichael\n"},{"id":"108755","messageId":"20090320200346.GD26934@coredump.intra.peff.net","threadId":"18404","inReplyTo":"49C354CC.2020108@drmicha.warpmail.net","subject":"Re: Gnome chose Git","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-20T20:03:46Z","receivedAt":"2009-03-20T20:03:46Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Mar 20, 2009 at 09:33:16AM +0100, Michael J Gruber wrote:\n\n> > But do note that reflogs expire eventually, so you will want to also\n> > look at gc.reflogexpire and gc.reflogexpireunreachable if you want to\n> > keep this as an activity log forever.\n> \n> In any case, reflogs are local. I would assume that accountability\n> tracking should be public and transparent. Depends on the use case, of\n> course.\n\nI think the use case was auditing \"when did this code get into the repo,\nand by whom\". Which is inherently a local thing, since you are talking\nabout when it got into a central repo.\n\nAs for public and transparent, reflogs are only the database mechanism;\ngit already has the hooks in place for writing every ref change to this\nmechanism, and it stores everything you need.  They would just need some\nway of publishing the information. I think it was you who suggested\nnotes, which would be one way of doing so; you could also publish tags\nindexed by pusher (since we may or may not actually care about fast\nlookup from commit to pusher here), or even just a web page.\n\n-Peff\n"}]}