-
Notifications
You must be signed in to change notification settings - Fork 2.1k
git lfs clone for submodules #1172
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
Comments
I started a discussion on the Git core mailing list in addition: http://thread.gmane.org/gmane.comp.version-control.git/292466 |
Man, submodules always throw a spanner in the works. In 1.2.1 the To support a manual cascade like this we'd firstly have to catch & suppress the |
Your 1.2.1 Your "catch & suppress I will try to prepare a patch for Git core. If this gets accepted then |
That sounds ideal, thanks @larsxschneider! |
Look what landed in next: git/git@89044ba If this patch makes it into Git 2.9 then we can do this: git -c filter.lfs.smudge= -c filter.lfs.required=false clone --recursive $URL $REPO_PATH
cd "$REPO_PATH"
git-lfs pull
git submodule--helper list |
while read mode sha1 stage sm_path
do
if test -e "$sm_path"/.git
then
(
cd "$sm_path"
git-lfs pull
)
fi
done Thanks to @gitster , @dscho , and @peff for making this work! |
Nice! Thanks so much for organising this. |
@sinbad: Do you have plans to update the |
Yeah, I was initially waiting to see if it made it into 2.9 and have been on vacation. I have some other transfer work to do first but it's on my list. |
Looking at this now, wouldn't it be better to use |
Nice idea! I haven't tested it but this should work, yes! |
Yeah, this is what I'm going with. PR soon. |
git lfs is not stable, but git submodule is much stable. |
@larsxschneider Is it possible that git/git@89044ba is not effective on Windows in the below scenario? LFS files are still downloaded during execution of:
If I enter the submodule dir, the two options are again set to their original (LFS enabled) values. What is really weird: That even seems to happens after The only thing that seems effective is setting (Version: 2.16.2.windows.1) |
I realized that the
git lfs clone
speed up does not work with Git Submodules and I wonder if anyone has a clever idea to approach this problem. Here is my first wrapper script attempt:This works by taking the relevant pieces from the
git submodule
command. However, this is probably a pretty fragile solution. I would prefer to use higher level Submodule commands. @sinbad @stefanbeller any better idea or do you think this is the way to go?The text was updated successfully, but these errors were encountered: