{"thread":{"id":"915","subject":"git-whatchanged doesn't display date human understandable","startedAt":"2005-06-12T09:34:13Z","lastAt":"2005-06-13T00:44:21Z","messageCount":2,"participants":["Thomas Glanzmann","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"4891","messageId":"20050612093413.GR20432@cip.informatik.uni-erlangen.de","threadId":"915","inReplyTo":null,"subject":"git-whatchanged doesn't display date human understandable","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-06-12T09:34:13Z","receivedAt":"2005-06-12T09:34:13Z","isPatch":false,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\nwhat option to I have to tweak to get timestamps human understandable\nagain:\n\ngit-whatchanged | head -5\ndiff-tree 422dee18f8b39b4c14332afbdf75a5c519bdbed2 (from 16df05aa0464e5e17d4ef023b78bc7b98546cb9a)\ntree 2ed70720e7103ae700a9dceac55c77d562057467\nparent 16df05aa0464e5e17d4ef023b78bc7b98546cb9a\nauthor vrsieh <vrsieh> 1082362048 +0000\ncommitter vrsieh <vrsieh> 1082362048 +0000\n                          ~~~~~~~~~~~~~~~~\n\nThis seems to happen with Linus git tree HEAD.\n\n\tThomas\n"},{"id":"4909","messageId":"7vslzngk62.fsf@assigned-by-dhcp.cox.net","threadId":"915","inReplyTo":"20050612093413.GR20432@cip.informatik.uni-erlangen.de","subject":"[PATCH] Support commit_format fully in diff-tree","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-06-13T00:44:21Z","receivedAt":"2005-06-13T00:44:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"TG\" == Thomas Glanzmann <sithglan@stud.uni-erlangen.de> writes:\n\nTG> Hello,\nTG> what option to I have to tweak to get timestamps human understandable\nTG> again:\n\nTG> git-whatchanged | head -5\n\n------------\nThis steals --pretty command line option from rev-list and\nteaches diff-tree to do the same.  With this change,\n\n    $ git-whatchanged --pretty\n\nwould work as expected.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n*** Sorry, but this patch does not include documentation updates\n*** or additional tests like my usual ones.  I would appreciate\n*** it if others on the list give help with them.  I will be\n*** offline for about a week or so, and trying to clean my stack\n*** as much as possible before I have to leave.\n\ncd /opt/packrat/playpen/public/in-place/git/git.junio/\njit-diff : diff-tree.c\n# - linus: git-apply: ignore empty git headers\n# + (working tree)\ndiff --git a/diff-tree.c b/diff-tree.c\n--- a/diff-tree.c\n+++ b/diff-tree.c\n@@ -398,7 +398,20 @@ static int diff_tree_stdin(char *line)\n }\n \n static char *diff_tree_usage =\n-\"git-diff-tree [-p] [-r] [-z] [--stdin] [-M] [-C] [-R] [-S<string>] [-O<orderfile>] [-m] [-s] [-v] [-t] <tree-ish> <tree-ish>\";\n+\"git-diff-tree [-p] [-r] [-z] [--stdin] [-M] [-C] [-R] [-S<string>] [-O<orderfile>] [-m] [-s] [-v] [--pretty] [-t] <tree-ish> <tree-ish>\";\n+\n+static enum cmit_fmt get_commit_format(const char *arg)\n+{\n+\tif (!*arg)\n+\t\treturn CMIT_FMT_DEFAULT;\n+\tif (!strcmp(arg, \"=raw\"))\n+\t\treturn CMIT_FMT_RAW;\n+\tif (!strcmp(arg, \"=medium\"))\n+\t\treturn CMIT_FMT_MEDIUM;\n+\tif (!strcmp(arg, \"=short\"))\n+\t\treturn CMIT_FMT_SHORT;\n+\tusage(diff_tree_usage);\n+}\n \n int main(int argc, const char **argv)\n {\n@@ -492,6 +505,11 @@ int main(int argc, const char **argv)\n \t\t\theader_prefix = \"diff-tree \";\n \t\t\tcontinue;\n \t\t}\n+\t\tif (!strncmp(arg, \"--pretty\", 8)) {\n+\t\t\tverbose_header = 1;\n+\t\t\tcommit_format = get_commit_format(arg+8);\n+\t\t\tcontinue;\n+\t\t}\n \t\tif (!strcmp(arg, \"--stdin\")) {\n \t\t\tread_stdin = 1;\n \t\t\tcontinue;\n\nCompilation finished at Sun Jun 12 17:39:24\n\n"}]}