Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --depth option to git clone #46

Merged
merged 1 commit into from
May 22, 2019

Conversation

orisano
Copy link
Contributor

@orisano orisano commented May 21, 2019

add --depth option to git clone.

before:

$ time git clone https://github.com/knqyf263/vuln-list
Cloning into 'vuln-list'...
remote: Enumerating objects: 32220, done.
remote: Counting objects: 100% (32220/32220), done.
remote: Compressing objects: 100% (20546/20546), done.
remote: Total 505602 (delta 29307), reused 12089 (delta 11664), pack-reused 473382
Receiving objects: 100% (505602/505602), 183.02 MiB | 2.00 MiB/s, done.
Resolving deltas: 100% (476710/476710), done.
Checking out files: 100% (270908/270908), done.
git clone https://github.com/knqyf263/vuln-list  38.15s user 59.75s system 46% cpu 3:29.36 total

after:

$ time git clone --depth=1 https://github.com/knqyf263/vuln-list
Cloning into 'vuln-list'...
remote: Enumerating objects: 275059, done.
remote: Counting objects: 100% (275059/275059), done.
remote: Compressing objects: 100% (89333/89333), done.
remote: Total 275059 (delta 236398), reused 205815 (delta 183887), pack-reused 0
Receiving objects: 100% (275059/275059), 151.76 MiB | 4.75 MiB/s, done.
Resolving deltas: 100% (236398/236398), done.
Checking out files: 100% (270908/270908), done.
git clone --depth=1 https://github.com/knqyf263/vuln-list  30.76s user 44.66s system 61% cpu 2:02.48 total

@knqyf263 knqyf263 merged commit 68f326d into aquasecurity:master May 22, 2019
Hardw01f added a commit to Hardw01f/trivy that referenced this pull request Oct 2, 2019
GuaoGuao pushed a commit to GuaoGuao/trivy that referenced this pull request Jun 24, 2020
liamg pushed a commit that referenced this pull request Jun 7, 2022
* docker_test: Do not pass nil context

Ref: https://github.com/golang/go/blob/master/src/context/context.go#L37:L38

Instead pass context.TODO()

Signed-off-by: Simarpreet Singh <[email protected]>

* cache_test: Add happy path for Get() and Set()

Signed-off-by: Simarpreet Singh <[email protected]>

* cache_test: Add happy path for clear

Signed-off-by: Simarpreet Singh <[email protected]>

* main: Rename os -> osFound to avoid shadowing

Signed-off-by: Simarpreet Singh <[email protected]>

* cache_test: Assert that cache is indeed cleared up.

Signed-off-by: Simarpreet Singh <[email protected]>
liamg pushed a commit that referenced this pull request Jun 7, 2022
* docker_test: Do not pass nil context

Ref: https://github.com/golang/go/blob/master/src/context/context.go#L37:L38

Instead pass context.TODO()

Signed-off-by: Simarpreet Singh <[email protected]>

* cache_test: Add happy path for Get() and Set()

Signed-off-by: Simarpreet Singh <[email protected]>

* cache_test: Add happy path for clear

Signed-off-by: Simarpreet Singh <[email protected]>

* main: Rename os -> osFound to avoid shadowing

Signed-off-by: Simarpreet Singh <[email protected]>

* cache_test: Assert that cache is indeed cleared up.

Signed-off-by: Simarpreet Singh <[email protected]>
josedonizetti referenced this pull request in josedonizetti/trivy Jun 24, 2022
Fix line numbers and issue with referencing metadata
knqyf263 referenced this pull request in knqyf263/trivy Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants