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

Submodule and sub-directory project is broken #153

Closed
bersace opened this issue Mar 11, 2022 · 3 comments
Closed

Submodule and sub-directory project is broken #153

bersace opened this issue Mar 11, 2022 · 3 comments
Labels

Comments

@bersace
Copy link

bersace commented Mar 11, 2022

Hi,

Say you have a repository with a Python project in a subdirectory and a submodule :

top_srcdir/
                /.gitmodules
                /project/
                            /setup.py
                            /MANIFEST.in
                            /submodule

check-manifest 0.47 project/ fails to determine the presence of a submodule becase _has_submodules checks for project/.gitmodules instead of top level .gitmodules.

A workaround is to put an empty project/.gitmodules file.

May I suggest to always call ls-files with --recurse-submodules ?

Thanks for check-manifest.

bersace added a commit to bersace/temboard that referenced this issue Mar 11, 2022
@mgedmin
Copy link
Owner

mgedmin commented Mar 13, 2022

The only reason I'm not always passing --recurse-submodules to git ls-files is that it used to be horrendously slow on Windows back when I maintained my own Jenkins builds on a Windows VM. Builds literally took hours.

I no longer maintain a Jenkins, and I believe newer Git versions have rewritten the submodule recursion code in C rather than the shell script that it used before, so it should be fine to remove that workaround.

(Also, I hadn't realized that .gitmodules could exist in any subdirectory, not just at the top level.)

EDIT: I completely forgot that there was a second reason not to pass --recurse-submodules: older Git versions didn't support it (see #124). Oh well, who says I have to support 6-year old Git versions?

@mgedmin
Copy link
Owner

mgedmin commented Mar 13, 2022

Released check-manifest 0.48 with a fix for this.

@bersace
Copy link
Author

bersace commented Mar 14, 2022

You're awesome. I had hard time too maintaining Jenkins CI. Kudo !

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

No branches or pull requests

2 participants