mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Speed up git thaw
Previously, git thaw would read the whole output of git rev-list HEAD via readlines(). This was unnecessary, because we almost always only need to look a few of the most recent commits. Most of the runtime of git-thaw was spend on this. After this commit, we only read the lines we actually need. This makes git thaw run much faster. Bug: 1378479 Change-Id: I6f6c06e1df55b4943a94642aa414fc11aeea5718 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3981233 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Martin Bidlingmaier <mbid@google.com>
This commit is contained in:
committed by
LUCI CQ
parent
f4670898b9
commit
6f2321d1de
@@ -922,7 +922,7 @@ def tags(*args):
|
|||||||
|
|
||||||
def thaw():
|
def thaw():
|
||||||
took_action = False
|
took_action = False
|
||||||
for sha in run_stream('rev-list', 'HEAD').readlines():
|
for sha in run_stream('rev-list', 'HEAD'):
|
||||||
sha = sha.strip().decode('utf-8')
|
sha = sha.strip().decode('utf-8')
|
||||||
msg = run('show', '--format=%f%b', '-s', 'HEAD')
|
msg = run('show', '--format=%f%b', '-s', 'HEAD')
|
||||||
match = FREEZE_MATCHER.match(msg)
|
match = FREEZE_MATCHER.match(msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user