You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git grep TODO main | sed 's/^[^:]\+://'> main_todos
git grep TODO HEAD | sed 's/^[^:]\+://'> head_todoes
combine head_todoes xor main_todos
That looks like it works, but I don't get the line numbers...
(also: I also get TODOs that are in main but not my branch... I don't actually want them!)
And if I add -n to git grep to have the line numbers, the combination might not work as the lines content don't match anymore ><
I could use git diff -U0 main.. to get a diff of all changes in the branch
There might be some options to avoid doing work, give better output, like --no-relative, --no-renames..
Also, it should skip leading indents, a TODO is a TODO, whereever it's placed!
Could use some git diff parsing code from delta ?
(Thinking far: Could become a generic grep over changes in the branch?)
Stackoverflow already saw that question, WITHOUT conclusive / acceptable results..
Brainstorm
That looks like it works, but I don't get the line numbers...
(also: I also get TODOs that are in main but not my branch... I don't actually want them!)
And if I add
-n
to git grep to have the line numbers, the combination might not work as the lines content don't match anymore ><I could use
git diff -U0 main..
to get a diff of all changes in the branchThere might be some options to avoid doing work, give better output, like
--no-relative
,--no-renames
..Also, it should skip leading indents, a TODO is a TODO, whereever it's placed!
Could use some git diff parsing code from
delta
?(Thinking far: Could become a generic grep over changes in the branch?)
Stackoverflow already saw that question, WITHOUT conclusive / acceptable results..
There IS a solution here: https://stackoverflow.com/a/51263327 BUT that requires searching twice, once to get the matching strings, another one (slow?) to get full file locations+matching string..
=> It would be better to just use git diff output and fill in line numbers!
The text was updated successfully, but these errors were encountered: