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

Rationale for symlinking does not seem valid #217

Open
QuLogic opened this issue Nov 23, 2018 · 2 comments
Open

Rationale for symlinking does not seem valid #217

QuLogic opened this issue Nov 23, 2018 · 2 comments

Comments

@QuLogic
Copy link
Member

QuLogic commented Nov 23, 2018

The rationale given is "thus reducing the overall repository size to those that need to clone the repository", but one of the old taglines for git is it's the "stupid content tracker", key word being content. Having multiple copies of the same file does not substantially change the size to be cloned:

mkdir separate
git init separate
cd separate
mkdir a b c
# This is the largest file in the repo at ~7M:
cp ../cartopy/docs/v0.15/examples/wmts_time_00_00.pdf a/
cp ../cartopy/docs/v0.15/examples/wmts_time_00_00.pdf b/
cp ../cartopy/docs/v0.15/examples/wmts_time_00_00.pdf c/
git add a b c
git commit -m 'Initialize'
git gc --aggressive
cd ../

mkdir symlinked
git init symlinked/
cd symlinked
mkdir a b c shared
cp ../cartopy/docs/v0.15/examples/wmts_time_00_00.pdf a/
cp ../cartopy/docs/v0.15/examples/wmts_time_00_00.pdf b/
cp ../cartopy/docs/v0.15/examples/wmts_time_00_00.pdf c/
../tools/symlink_common.py . --shared-dir shared
git add a/ b/ c/ shared/
git commit -m 'Initialize'
git gc --aggressive
cd ..

This gives:

$ du -hsc */.git
7.3M	separate/.git
7.3M	symlinked/.git

Symlinking might be useful to reduce checkout size though, so maybe that's what it should say?

@pelson
Copy link
Member

pelson commented Dec 4, 2018

I agree (and was looking for a similar comment I made recently, but couldn't find it). I'm mostly responsible for this - and completely accept that the statement is incorrect.

I'm open to fixing the rationale, or simply starting to cease using the symlinking stuff. Any preference @QuLogic?

@QuLogic
Copy link
Member Author

QuLogic commented Dec 4, 2018

No preference really. There might be some savings in local checkouts, but I have not measured it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants