Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool to find TODO/FIXME only added in current branch #92

Open
bew opened this issue Jan 27, 2024 · 0 comments
Open

Tool to find TODO/FIXME only added in current branch #92

bew opened this issue Jan 27, 2024 · 0 comments

Comments

@bew
Copy link
Owner

bew commented Jan 27, 2024

Brainstorm

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..

=> It would be better to just use git diff output and fill in line numbers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant