{"thread":{"id":"61879","subject":"Feature request: Stats in git log","startedAt":"2024-08-01T14:26:05Z","lastAt":"2024-08-01T14:26:05Z","messageCount":1,"participants":["Steinar Sturlaugsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"499849","messageId":"CAAWdfG6yprY_uFOQq5wK20EgwNrUcnmVpnBz3ejfBXcs-i_aZg@mail.gmail.com","threadId":"61879","inReplyTo":null,"subject":"Feature request: Stats in git log","fromName":"Steinar Sturlaugsson","fromEmail":"costeinar@gmail.com","sentAt":"2024-08-01T14:25:54Z","receivedAt":"2024-08-01T14:26:05Z","isPatch":false,"sender":{"key":"costeinar@gmail.com","avatar":null},"body":"Hi,\n\nLong time lurker sending my first mail to the list. I hope I'm doing this right.\n\nI'm interested in getting the stats that are shown with `git log\n--shortstat` based on the format string provided with the `--pretty`\nflag.\n\nExample:\n\n```\ngit log --oneline --pretty=format:%ad,%H --date=iso --shortstat\n```\n\nThis returns something like:\n\n```\n2021-01-07 09:56:48 +0100,<SHA>\n 58 files changed, 21 insertions(+), 50 deletions(-)\n```\n\nI will now have to parse the input for my purposes of reporting it in\na CSV file.\n\nI wonder if (A) it's possible to specify this already with e.g.\n\n```\ngit log --oneline\n--pretty=format:%ad,%H,<changedflag>,<insertedflag>,<deletedflag>\n--date=iso\n```\n\nwhere the result for the same commit would become:\n\n```\n2021-01-07 09:56:48 +0100,<SHA>,58,21,50\n```\n\nI'm aware that commits sometimes don't have stats. In that case, I\nwould expect e.g. `NaN` or `null` instead of a number.\n\n(B) If this is not available, is there any interest in a PR providing it?\n\nBest,\nSteinar\n"}]}