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

Do not display auto-generated files in GitHub PR diffs #71

Open
Zimmi48 opened this issue Jul 25, 2020 · 1 comment
Open

Do not display auto-generated files in GitHub PR diffs #71

Zimmi48 opened this issue Jul 25, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@Zimmi48
Copy link
Member

Zimmi48 commented Jul 25, 2020

GitHub supports marking some committed files as auto-generated, in which case, they are not shown by default in PR diffs (as in https://github.com/conda-forge/coq-feedstock/pull/13/files). If we want to use this feature, the trick is to pass linguist-generated=true in .gitattributes, as shown here.

@palmskog palmskog added the enhancement New feature or request label Jul 28, 2020
@Zimmi48
Copy link
Member Author

Zimmi48 commented Mar 26, 2021

We need a system to be able to tell generate.sh that some file has been manually modified and should not be overwritten when regenerating from the templates. With @CohenCyril, we have considered using the header comments as a signal whether the file is auto-generated or not, but this doesn't work for files which do not support header comments like dune-project. So instead, we've decided that we could rely on these linguist-generated=true annotations in .gitattributes. When someone modifies an auto-generated file, they would need to remove it from the list and generate.sh file would detect that it exists but isn't listed and would stop updating it (printing a notice instead).

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

No branches or pull requests

2 participants