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

Use a Git Submodule for _tools #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RandomDSdevel
Copy link

@RandomDSdevel RandomDSdevel commented May 3, 2020

     See my commit message(s) for details. I could have changed the script to commit any new submodule changes, but it doesn't seem that this subdirectory is meant to be tracked explicitly listed in the repository's '.gitignore' file.

     (Using submodules is a better way to include a Git repository inside ano-
ther than just doing a raw clone of the repository into the relevant folder, as
before, seeing as I don't recall the latter ever being a good idea.)  Keep using
`_tools` as that folder, but also test its status as a submodule when checking
for its existence.
     This is required because `_tools` is explicitly listed in the repository's
`.gitignore` file.
@RandomDSdevel
Copy link
Author

     Per my second commit message, I added the '-f' flag to the 'git submodule add' invocation this PR adds to '_get_tools.sh' to insist on a one-time override of your '.gitignore' so the script can do its job.

@RandomDSdevel
Copy link
Author

RandomDSdevel commented May 3, 2020

     I could (and likely should?) also make the first submodule check not emit:

fatal: cannot change to './_tools/': No such file or directory

on first use (when said folder doesn't already exist) — probably by redirecting standard error to '/dev/null,' as I don't believe '--quiet' would hide that kind of error.

@gfoury
Copy link

gfoury commented May 6, 2020

My experience with Git submodules is that they seem like a great idea, but are a stumbling block for new users...unless the build process does the checks for missing modules. And in this case it does. So, +1.

@RandomDSdevel
Copy link
Author

     The full repository's build script is actually a different file, naturally called 'makefile,' which I'm not touching here, but, yes, I see what you're getting at. Clear setup and build instructions in a project's read-me help in the case you're talking about, but I suppose one can't always count on those being available as much as one would like.

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.

2 participants