News for hackers. Stuff that matters.
Re:Plotting the source code “TODO” history of the most popul... by peff on Monday May 17, 2021 @04:35AM (#27181250)
What do you want `blame --porcelain` to do that it doesn't? Using:

    git blame --line-porcelain "$1" -L "$2,"$2" |
    perl -MPOSIX=strftime -lne '/^author-time (\d+)/ and print strftime("%Y", localtime($1))'
I suppose it would be a little more convenient if you could ask `git blame` to format the whole line itself, but that wouldn't be part of the `--porcelain` output.

All that said, that pipeline is quite slow on something like linux.git, as it runs a series of blames which will walk over the same history many times. I think:

    git log -STODO --format=%ad --date=short
would be much faster (it's not _quite_ the same thing, as it counts TODOs which went away, but is a reasonable variant).
Re:Plotting the source code “TODO” history of the most popul... by pizza234 on Monday May 17, 2021 @05:02AM (#27181412)
> What do you want `blame --porcelain` to do that it doesn't? Using:

It increases the complexity, due to time conversion. One can certainly solve the general problem by throwing enough awk/perl/sed at it, but an option to customize the blame output would make it significantly more ergonomic (and the oneliner much simpler).