Git - order commits "TODO" introduction by date

I want to find the commits that I submitted added the comment "TODO" or "FIXME" and ordered them by date.

I know it git log -G'TODO|FIXME'

will show me commits containing any comment and I could do something like

git log --format='%ci' -G'TODO|FIXME' | cut -d' ' -f 1

      

But that would not mean that it should only introduce such comments.

Does anyone know how I can only find commits entering such comments and ordering them by date? If the actual SHA-1 were included in this list, it would be even more awesome.

+3


source to share


2 answers


It should get closer to you. It is not clear what you mean by "order them by date". Personally, I would probably ignore the actual dates and do the reverse topo order.

Note. This will match commits that introduce or remove instances of the row. If you only want the commits you are familiar with, you may need to script something.



git log --format='%H' --reverse --date-order -G'TODO|FIXME'

+5


source


not exactly what you want, but will do a lot for you



git log -S TODO

      

0


source







All Articles