mirror of
https://github.com/git/git.git
synced 2026-08-06 16:12:01 +00:00
amlook: do not use the reverse mapping
It's inherently unreliable across renames and cherry-picks.
This commit is contained in:
16
amlook
16
amlook
@@ -7,17 +7,6 @@
|
||||
find_commit () {
|
||||
in= commits=
|
||||
|
||||
if test -z "$commits"
|
||||
then
|
||||
blob=$(echo "Message-Id: $1" | git hash-object --stdin)
|
||||
commits=$(git notes --ref amlog show $blob | sed -e '/^$/d')
|
||||
fi
|
||||
|
||||
if test -z "$commits"
|
||||
then
|
||||
commits=$(sed -ne "s|^\([0-9a-f]\{40\}\) $1|\1|p" .git/am.log)
|
||||
fi
|
||||
|
||||
if test -z "$commits"
|
||||
then
|
||||
# I know I know there should be "notes grep" command...
|
||||
@@ -27,6 +16,11 @@ find_commit () {
|
||||
)
|
||||
fi
|
||||
|
||||
if test -z "$commits"
|
||||
then
|
||||
commits=$(sed -ne "s|^\([0-9a-f]\{40\}\) $1|\1|p" .git/am.log)
|
||||
fi
|
||||
|
||||
if test -z "$commits"
|
||||
then
|
||||
echo "Never applied"
|
||||
|
||||
Reference in New Issue
Block a user