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

Add support for exporting only init'ed submodules #60

Open
akien-mga opened this issue Nov 6, 2018 · 3 comments
Open

Add support for exporting only init'ed submodules #60

akien-mga opened this issue Nov 6, 2018 · 3 comments

Comments

@akien-mga
Copy link

My use case involves exporting a Git repository with only a subset of its submodules initialized and updated, as shown here:

$ git submodule 
 f60be494a43a49fd7ff61603e132c1e24c160d88 assets/lang (f60be49)
-7751cf73f5c06f1be21f5f31c3e2d9a7bacd3a93 dx9sdk
 be7425ef70231ab82930331959ab487d605d0482 ext/SPIRV-Cross (2018-08-07~7)
 9efe3367284d2d1eeb14fc302a2c12c36e3e255e ext/armips (v0.9-128-g9efe336)
 3d3ae7129d17643bc706da0a2eea85aafd10ab3a ext/discord-rpc (v3.1.0-20-g3d3ae71)
 29619b2312f7bc862221749f3f4d37c3e6a0dee2 ext/glslang (2.3-2139-g29619b23)
-73063f5002612c6bf64fe24f851cd5cc0d83eef9 ext/rapidjson
-7472c903ec771c00af9925097e8d37075e9a379f ffmpeg
-d02ba7407050f445edf9e908374ad4bf3b2f237b pspautotests

It used to work fine in the past with git-archive-all, but now I'm getting this kind of error:

$ git archive-all --prefix=ppsspp-1.7.2/ ../SOURCES/ppsspp-1.7.2.tar.xz
[Errno 2] No such file or directory: '/home/akien/Mageia/Checkout/ppsspp/ppsspp/pspautotests/pspautotests'

I initially thought that it would be a git-archive-all regression and went back to older versions to test (down to 1.15), but all versions give me the same output.

I suspect this might be due to a change in Git itself (I'm running Git 2.19.1 now, but last time I used this workflow successfully I was on 2.13.x).

It used to work fine so IMO it could be handled as a bug in git-archive-all that it no longer works, but I'm fine with it being treated as a feature request to add a --ignore-unitialized switch or similar to enable this workflow. Thanks!

@Kentzo
Copy link
Owner

Kentzo commented Nov 6, 2018

What if in addition to --extra there will be an --exclude option?

@akien-mga
Copy link
Author

That would work for me too.

Kentzo added a commit that referenced this issue Nov 7, 2018
--no-exclude -> --ignore-gitattributes
--extra -> --include

--include should properly recognize directories.

Refs #60
@Kentzo
Copy link
Owner

Kentzo commented Nov 7, 2018

Added both options, so you should be able to exclude the submodules either way. Please try both of them and let me know if it works for your use-case.

Kentzo added a commit that referenced this issue Nov 7, 2018
--no-exclude -> --ignore-gitattributes
--extra -> --include

--include should properly recognize directories.

Refs #60
Kentzo added a commit that referenced this issue Nov 7, 2018
--no-exclude -> --ignore-gitattributes
--extra -> --include

--include should properly recognize directories.

Refs #60
Kentzo added a commit that referenced this issue Nov 8, 2018
--no-exclude -> --ignore-gitattributes
--extra -> --include

--include should properly recognize directories.

Refs #60
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

No branches or pull requests

2 participants