Skip to content

common .gitignore file#210

Closed
clarketm wants to merge 1 commit intoistio:masterfrom
clarketm:global-ignore
Closed

common .gitignore file#210
clarketm wants to merge 1 commit intoistio:masterfrom
clarketm:global-ignore

Conversation

@clarketm
Copy link
Copy Markdown
Member

@clarketm clarketm commented Mar 10, 2020

@istio-testing istio-testing added the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Mar 10, 2020
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Mar 10, 2020
@istio-testing istio-testing added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 10, 2020
Copy link
Copy Markdown
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this in addition to normal gitignore?

@clarketm
Copy link
Copy Markdown
Member Author

clarketm commented Mar 10, 2020

is this in addition to normal gitignore?

Yes, this it is additive. xref: https://git-scm.com/docs/gitignore#_configuration

@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 10, 2020
@istio-testing istio-testing added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 10, 2020
@clarketm clarketm changed the title common global ignore file common .gitignore file Mar 10, 2020
@clarketm clarketm marked this pull request as ready for review March 10, 2020 04:49
@clarketm clarketm requested a review from a team as a code owner March 10, 2020 04:49
@istio-testing istio-testing removed the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Mar 10, 2020
fi

# Setup common .gitignore
git config --local core.excludesfile ./common/config/.gitignore_common
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concern I see with this is it will modify the local environment when run outside of the container. I personally already have this setting set, so this would be mangling my setup.

Additionally, I suspect most people are using git outside of the container (direct git commands), so this won't apply there and they may get weird.

If we have common/.gitignore does it only apply to files inside of common/, or could we hack that to have 2 "real" gitignores?

Copy link
Copy Markdown
Member Author

@clarketm clarketm Mar 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concern I see with this is it will modify the local environment when run outside of the container. I personally already have this setting set, so this would be mangling my setup.

Yes, the fact that only one file can exist for core.excludesfile at each level would indeed be mangling the setup if the user already has it set.

If we have common/.gitignore does it only apply to files inside of common/, or could we hack that to have 2 "real" gitignores?

One option is to merge (i.e append) the common/.gitignore to the local .gitignore on make update-common. Alternatively, we could alias git to git -c ./common/.gitignore but it would only be scoped to Makefile rules. Otherwise, I am open to suggestions.

@clarketm
Copy link
Copy Markdown
Member Author

I like the idea, but the execution is flawed. I will reopen once I have a more robust solution.

@clarketm clarketm closed this Mar 12, 2020
fjglira pushed a commit to fjglira/istio-common-files that referenced this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants