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

Caddyfile in .gitignore? #2237

Closed
sssilver opened this issue Jul 25, 2018 · 5 comments
Closed

Caddyfile in .gitignore? #2237

sssilver opened this issue Jul 25, 2018 · 5 comments

Comments

@sssilver
Copy link

sssilver commented Jul 25, 2018

Hi,

We're using Caddy as a dependency for our project through dep, and we check in our vendored dependencies. However, because of the fact that Caddy's .gitignore contains an entry Caddyfile, that particular directory under vendor/ remains ignored and doesn't get pushed into our repository. This causes the build to be broken for whoever clones the repo, as they have to delete the vendor Caddy directory and re-run $ dep ensure to get caddyfile back.

It may be intentional that the .gitignore lists Caddyfile with an uppercase C, and the directory itself is called caddyfile with a lowercase c, however on a macOS system git disregards the case difference.

Please advise.

Thanks,
Areg

@sssilver sssilver changed the title caddyfile in .gitignore? Caddyfile in .gitignore? Jul 25, 2018
@francislavoie
Copy link
Member

I think maybe a !caddyfile/ rule should be added. It would effectively be a double negative, including the caddyfile folder.

Alternatively, it looks like you could configure your git to not ignore case with git config core.ignorecase false but I haven't tested that idea.

@sssilver
Copy link
Author

This is a little confusing. Is there a difference between caddyfile and Caddyfile?

@francislavoie
Copy link
Member

Yes, Caddyfile is the filename for the config file Caddy uses. caddyfile is the name of a folder of Go code which implements parsing of the Caddyfile file format.

@sssilver
Copy link
Author

Ah, that makes it quite prone to problems.

I vote for !caddyfile/, since it disambiguates the pattern and the intentions. Shall I open a PR?

@francislavoie
Copy link
Member

Yeah, sounds good 👍

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

3 participants