{"thread":{"id":"13704","subject":"Bug in git-log --date=short --pretty=format:\"%ad\"","startedAt":"2008-05-28T13:49:35Z","lastAt":"2008-05-28T15:11:58Z","messageCount":2,"participants":["Christophe GRENIER","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77935","messageId":"alpine.LFD.1.10.0805281535560.8172@adsl.cgsecurity.org","threadId":"13704","inReplyTo":null,"subject":"Bug in git-log --date=short --pretty=format:\"%ad\"","fromName":"Christophe GRENIER","fromEmail":"grenier@cgsecurity.org","sentAt":"2008-05-28T13:49:35Z","receivedAt":"2008-05-28T13:49:35Z","isPatch":false,"sender":{"key":"grenier@cgsecurity.org","avatar":null},"body":"Hi,\n\nAccording to the git-log man page, we can configure how date are \ndisplayed:\n\n--date={relative,local,default,iso,rfc}\n   Only takes effect for dates shown in human-readable format,\n   such as when using \"--pretty\".\n\nBut it doesn't work when a user supplied format is used:\n\ngit-log --date=short --pretty=format:\"%ad\"\nWed May 28 13:28:35 2008 +0200\nWed May 28 13:26:14 2008 +0200\n...\n\ninstead of\n2008-05-28\n2008-05-28\n...\n\nIn pretty.c, when pretty_print_commit() calls format_commit_message(),\ndmode isn't passed as argument so format_commit_item() will never have\nthe date format specified at the command line.\nThis problem is present in git-1.5.5.3\n\nRegards,\n\n \tChristophe\n\n-- \n    ,-~~-.___.     ._.\n   / |  '     \\    | |\"\"\"\"\"\"\"\"\"|   Christophe GRENIER\n  (  )         0   | |         | grenier@cgsecurity.org\n   \\_/-, ,----'    | |         |\n      ====         !_!--v---v--\"\n      /  \\-'~;      |\"\"\"\"\"\"\"\"|   TestDisk & PhotoRec\n     /  __/~| ._-\"\"||        |   Data Recovery\n   =(  _____|_|____||________|   http://www.cgsecurity.org\n"},{"id":"77940","messageId":"7vd4n6wji9.fsf@gitster.siamese.dyndns.org","threadId":"13704","inReplyTo":"alpine.LFD.1.10.0805281535560.8172@adsl.cgsecurity.org","subject":"Re: Bug in git-log --date=short --pretty=format:\"%ad\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-05-28T15:11:58Z","receivedAt":"2008-05-28T15:11:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christophe GRENIER <grenier@cgsecurity.org> writes:\n\n> According to the git-log man page, we can configure how date are\n> displayed:\n>\n> --date={relative,local,default,iso,rfc}\n>   Only takes effect for dates shown in human-readable format,\n>   such as when using \"--pretty\".\n>\n> But it doesn't work when a user supplied format is used:\n\nSorry, in theory, perhaps they could, but it doesn't and it never did.\nThe output is working as designed and intended.\n\nYou probably could send a patch to add %aT and %cT that are defined as\n\"author/committer date in the format specified with --date=<this> option\";\nbut \"%ad\" and \"%cd\" are defined to emit \"author/committer date always in\nthe default format\".\n"}]}