Merge ~alexmurray/ubuntu-cve-tracker:optimise-cve-lib-get-long-kernel-hash into ubuntu-cve-tracker:master
Status: | Merged |
---|---|
Merged at revision: | f77960c691522ef8d1c638bd26f56a5c056cd243 |
Proposed branch: | ~alexmurray/ubuntu-cve-tracker:optimise-cve-lib-get-long-kernel-hash |
Merge into: | ubuntu-cve-tracker:master |
Diff against target: |
30 lines (+15/-1) 1 file modified
scripts/cve_lib.py (+15/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Seth Arnold | Approve | ||
Marc Deslauriers | Approve | ||
Review via email: mp+462745@code.launchpad.net |
Description of the change
scripts/cve_lib.py: optimise get_long_
The initial kernel git commit is a single huge commit which added the entire
2.6.12-rc2 kernel into the git repo - as such, fetching this takes a really long
time AND it is both a common Fixes: commit since it is used for anything which
has existed in the kernel since that time. So optimise for this case by checking
specifically if a short_hash matches this and just returning the known full
commit hash in that case without looking it up. Also for the general case, since
we really only need the first line of the commit patch body to get the "From "
line, just fetch the first 1k of the patch without waiting for the rest.
Signed-off-by: Alex Murray <email address hidden>
LGTM, thanks!