Skip to content

Conversation

@rafaelfranca
Copy link
Member

This will save space by not downloading the .git folder and just getting the source code for the specified tag.

I could save 10GB in the documentation server without downloading the git repositories.

The only thing I need to double check is if the doc generation itself in the Rails repo uses the git repository in any way.

This will save space by not downloading the `.git` folder and just
getting the source code for the specified tag.
@rafaelfranca rafaelfranca requested a review from fxn November 1, 2025 19:22
@rafaelfranca
Copy link
Member Author

Confirmed that both api and guides generation work without the git repository.

@fxn
Copy link
Member

fxn commented Nov 1, 2025

I am fine with the patch, but if we compare

git -c advice.detachedHead=false clone -q --depth 1 --single-branch --branch $tag https://github.com/rails/rails.git $tag

with

curl -sSL https://github.com/rails/rails/archive/refs/tags/$tag.tar.gz | tar -xzf - --strip-components=1

we only save 7 MB for tag=v8.0.0 (44 MB vs 51 MB).

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.

3 participants