blob: 8ab96ebd5e36e0e4bbc58b59bc53c22a2ff17789 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
# Show TODOs since base branch
git diff --diff-filter=a -S'TODO' "$(git oldest-ancestor)"... |
egrep --after-context 1 '^\+.*\bTODO\b' |
sed 's/^+[[:space:]]*//'
# Want:
# - filename
# - line number
# Use git blame?
# fgrep -A 1 -n TODO $(git diff --name-only $(git oldest-ancestor)... )
# ^ not quite the same thing, as it will catch old TODOs in updated files
# https://stackoverflow.com/questions/23298812/python-unified-diff-with-line-numbers-from-both-files
# diff --unchanged-line-format=' %.2dn %L' --old-line-format="-%.2dn %L" --new-line-format="+%.2dn %L" <(git show @~:app/module/background/nativeMessageManager.js) app/module/background/nativeMessageManager.js
|