Skip to content

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