-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Restructure .gitignore files #4707
Conversation
@@ -0,0 +1,3 @@ | |||
* | |||
!.gitignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is repeated in many places? Can you remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's technically not necessary since the .gitignore file is itself added. I added it in all the files because I assume in the future, if someone adds a new directory they will use one of the existing .gitignore files as a template. However, If the file doesn't un-ignore itself, it will not show up in their list of modified files, so it will not get added to their commit and may get overlooked. They would need to make sure to explicitly add the new .gitignore file.
I can simply remove them all if you prefer.
@@ -0,0 +1,3 @@ | |||
* | |||
!.gitignore | |||
!Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you need unignore? Who ignore it at first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first line, *
ignores everything, then we un-ignore the Makefile here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ignore everything? That will make things complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we only want to commit the Makefile. We don't care about the generated files, and if the generated files change, we will need to update this. This way, we never need to update it unless we need to add any files.
!debian/changelog | ||
!debian/compat | ||
!debian/control | ||
!debian/rules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge them into one line rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with the above, these are inverse ignore rules. We ignore all, then un-ignore the files we want to keep. Otherwise, there would be more lines :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debian/*
make things complex. Could you just ignore what you want to ignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. There are more files we want to ignore than the number we want to commit.
* | ||
!.gitignore | ||
!Makefile | ||
!patch/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who ignored it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first line, *
ignores everything, then we un-ignore the Makefile and patch directory here.
Retest mellanox please |
Retest vsimage please |
2 similar comments
Retest vsimage please |
Retest vsimage please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qi/Joe/Myself had an offline discussion. Qi is ok with moving ahead but he has different opinion on this PR.
Add .gitignore files in each subdirectory of src/, so as to reduce the size of the .gitignore file in the project root, and also make it easier to maintain (i.e., if a directory in src/ is removed, there will not be outdated entries in the root .gitignore file.
Also add missing .gitignore entries and remove outdated entries and duplicates.