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 flag to keep .git directories #203

Closed
anarcat opened this issue Oct 20, 2022 · 3 comments · Fixed by #210
Closed

add flag to keep .git directories #203

anarcat opened this issue Oct 20, 2022 · 3 comments · Fixed by #210
Assignees

Comments

@anarcat
Copy link

anarcat commented Oct 20, 2022

Say I have this Puppetfile snippet:

mod 'smash/tor',
    :git => 'https://gitlab.com/shared-puppet-modules-group/tor.git',
    :commit => 'ae9c9d54ce2d03afda08a319911c9bfa473e303f' # 4.0.0

this will correctly fetch the right commit and deploy it in modules/tor, great! But it strips the .git directory as well. While that may be nice in production, on my dev workstation, I actually want to have those repositories there since I might be doing dev there as well...

Is there some flag that allows me to do this? Otherwise, would a PR adding this feature be acceptable?

Thanks!

@xorpaul
Copy link
Owner

xorpaul commented Oct 21, 2022

There is the g10k config option clone_git_modules: true

#151 (comment)

Does this look acceptable to you?

@anarcat
Copy link
Author

anarcat commented Oct 21, 2022 via email

@anarcat
Copy link
Author

anarcat commented Nov 8, 2022

There is the g10k config option clone_git_modules: true

I can confirm that it seems impossible to keep git checkouts in -puppetfile mode: there's no flag on the commandline to enable it, and there's no Puppetfile syntax for it either. I can't use -config without rewriting my Puppetfile into g10k's config file format instead, which I am hesitant in doing because then I can't switch away from g10k easily ever again...

@xorpaul xorpaul self-assigned this Nov 30, 2022
xorpaul added a commit that referenced this issue Dec 1, 2022
* add hint from which context checkDirAndCreate() was called

* update parameters

* add -clonegit parameter to get a git clone of each git Puppet module, fixes #203

* disable cgo
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 a pull request may close this issue.

2 participants