{"thread":{"id":"98","subject":"Re: [PATCH] Pretty-print date in 'git log'","startedAt":"2005-04-18T10:27:44Z","lastAt":"2005-04-18T12:24:39Z","messageCount":2,"participants":["Petr Baudis","David Woodhouse"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"640","messageId":"20050418102744.GK1461@pasky.ji.cz","threadId":"98","inReplyTo":"1113808105.5286.1.camel@localhost.localdomain","subject":"Re: [PATCH] Pretty-print date in 'git log'","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-18T10:27:44Z","receivedAt":"2005-04-18T10:27:44Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Apr 18, 2005 at 09:08:24AM CEST, I got a letter\nwhere David Woodhouse <dwmw2@infradead.org> told me that...\n> On Mon, 2005-04-18 at 07:43 +0100, Sanjoy Mahajan wrote:\n> > Is this short script good enough:\n> \n> It's not far off; thanks. We might as well just do it like that inside\n> gitlog.sh. Could do with falling back to just printing the input if it\n> can't parse it -- the git repo has old-style dates in it still.\n\nYes. As far as I'm concerned, I'd put such stuff to git log, and extend\nit usage so that it is possible to print individual log entries with it\n- just make it accept a _range_ of commits, and then do\n\n\tgit log $commit $commit\n\nAnd maybe options for changelog-suitable output (RMK-like) etc.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"651","messageId":"1113827080.5286.10.camel@localhost.localdomain","threadId":"98","inReplyTo":"20050418102744.GK1461@pasky.ji.cz","subject":"Re: [PATCH] Pretty-print date in 'git log'","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-04-18T12:24:39Z","receivedAt":"2005-04-18T12:24:39Z","isPatch":true,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2005-04-18 at 12:27 +0200, Petr Baudis wrote:\n> Yes. As far as I'm concerned, I'd put such stuff to git log, and extend\n> it usage so that it is possible to print individual log entries with it\n> - just make it accept a _range_ of commits, and then do\n> \n>         git log $commit $commit\n\nThat's fairly trivial. In the current (and misguided) version with\nchronological output, rev-tree will do it all for you, in fact:\n\n\trev-tree $1 ^$2\n\nIn the older and more useful version, it was only slightly more complex:\n\n base=$(gitXnormid.sh -c $1) || exit 1\n \n+if [ -n \"$2\" ]; then\n+    endpoint=$(gitXnormid.sh -c $2) || exit 1\n+    if rev-tree $base $endpoint | grep -q $base:3; then\n+        base=\n+    else\n+        rev-tree --edges $base $endpoint | sed 's/[a-z0-9]*:1//g' > $TMPCL\n+    fi\n+fi\n changelog $base\n rm $TMPCL $TMPCM\n\n\n-- \ndwmw2\n\n"}]}