mirror of
https://github.com/git/git.git
synced 2026-08-09 09:34:14 +00:00
Meta/amlook: look in the text log first
as it is much faster than grepping from the notes tree.
This commit is contained in:
14
amlook
14
amlook
@@ -6,11 +6,15 @@
|
||||
|
||||
find_commit () {
|
||||
in=
|
||||
# I know I know there should be "notes grep" command...
|
||||
commits=$(
|
||||
git grep -l -e "$1" notes/amlog |
|
||||
sed -e 's|^notes/amlog:||' -e 's|/||g'
|
||||
)
|
||||
commits=$(sed -ne "s|^\([0-9a-f]\{40\}\) $1|\1|p" .git/am.log)
|
||||
if test -z "$commits"
|
||||
then
|
||||
# I know I know there should be "notes grep" command...
|
||||
commits=$(
|
||||
git grep -l -e "$1" notes/amlog |
|
||||
sed -e 's|^notes/amlog:||' -e 's|/||g'
|
||||
)
|
||||
fi
|
||||
if test -z "$commits"
|
||||
then
|
||||
echo "Never applied"
|
||||
|
||||
Reference in New Issue
Block a user