Commit 657e7fb4 authored by prasadv's avatar prasadv Committed by Commit bot

Make correction to grep pattern to grab git hash for given commit position.

Note that the pattern used to check commit position appears two times in reverted
CL, therefore match the pattern at begining of the line

BUG=413365,412054
NOTRY=true

Review URL: https://codereview.chromium.org/564873003

Cr-Commit-Position: refs/heads/master@{#294463}
parent b4dd54b7
...@@ -154,7 +154,7 @@ class GitSourceControl(SourceControl): ...@@ -154,7 +154,7 @@ class GitSourceControl(SourceControl):
for i in search_range: for i in search_range:
svn_pattern = 'git-svn-id: %s@%d' % (depot_svn, i) svn_pattern = 'git-svn-id: %s@%d' % (depot_svn, i)
commit_position_pattern = 'Cr-Commit-Position: .*@{#%d}' % i commit_position_pattern = '^Cr-Commit-Position: .*@{#%d}' % i
cmd = ['log', '--format=%H', '-1', '--grep', svn_pattern, cmd = ['log', '--format=%H', '-1', '--grep', svn_pattern,
'--grep', commit_position_pattern, 'origin/master'] '--grep', commit_position_pattern, 'origin/master']
......
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