Commit 056bef20 authored by Jeff Carpenter's avatar Jeff Carpenter Committed by Commit Bot

Fix git-crrev-parse returning reverted commits instead of original commits

Also delete extraneous whitespace

BUG=685326

Change-Id: If7f68346fd27edf9a5dca315cfcfbca0decc2da6
Reviewed-on: https://chromium-review.googlesource.com/433158Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
parent 8adfedcf
......@@ -41,11 +41,10 @@ while [ -n "$1" ]; do
remote_ref="${remote_ref/refs\/branch-heads/refs\/remotes\/branch-heads}"
num="${commit_pos#*@\{\#}"
num="${num%\}}"
if [ -z "$ref" -o -z "$num" ]; then
git rev-parse "$1"
else
grep_str="Cr-Commit-Position: $ref@{#$num}"
grep_str="^Cr-Commit-Position: $ref@{#$num}"
git rev-list -n 1 --grep="$grep_str" "$remote_ref"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment