Skip to content

Use new go-git functionality to fetch commits #12

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

Merged
merged 1 commit into from
May 11, 2020

Conversation

tianon
Copy link
Member

@tianon tianon commented May 11, 2020

This avoids shelling out by using the implementation from go-git/go-git#58 / go-git/go-git@8ecd388, which is going to be much more performant.

This avoids shelling out by using the implementation from go-git/go-git@8ecd388, which is going to be much more performant.
@tianon
Copy link
Member Author

tianon commented May 11, 2020

Proof's in the pudding -- here's fetching the first hello-world commit vs fetching the latest, and the resulting "cache directory" size/increase:

$ BASHBREW_CACHE="$HOME/temp/tmp/bashbrew-cache" ~/docker/bashbrew/bashbrew.sh --debug from --uniq https://github.com/docker-library/official-images/raw/b04f64dd645433ff2c70882eb550660969bfb244/library/hello-world
warning: insecure protocol git:// detected: git://github.com/docker-library/hello-world
hello-world:latest: scratch

$ du -hs ~/temp/tmp/bashbrew-cache
64K	/home/tianon/temp/tmp/bashbrew-cache

$ BASHBREW_CACHE="$HOME/temp/tmp/bashbrew-cache" ~/docker/bashbrew/bashbrew.sh --debug from --uniq https://github.com/docker-library/official-images/raw/master/library/hello-world
hello-world:linux: scratch
hello-world:nanoserver-1809: mcr.microsoft.com/windows/nanoserver:1809

$ du -hs ~/temp/tmp/bashbrew-cache
632K	/home/tianon/temp/tmp/bashbrew-cache

@yosifkit yosifkit merged commit 870ac0f into docker-library:master May 11, 2020
@yosifkit yosifkit deleted the go-git-fetch-commit branch May 11, 2020 18:51
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