Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to the application or project's homepage
https://umbraco.com/ (source: https://github.com/umbraco/Umbraco-CMS)
Reasons for making this change
The last rule of
community/DotNet/Umbraco.gitignore,!**/umbraco/Data/packages("include default location for packages"), has no effect.**/umbraco/*a few lines above ignoresumbraco/Data, and git cannot re-include a path whose parent directory is excluded. So the packages folder is ignored like the rest ofumbraco/Data.#4314 fixed the same problem for
!**/umbraco/modelsby changing**/umbraco/to**/umbraco/*. That works formodels, a direct child ofumbraco/, butData/packagesis one level deeper and still sits under an excluded directory.The fix re-includes
umbraco/Data/, ignores its contents again, and then re-includespackagesand the files in it:The last line follows the existing
!**/App_Data/[Pp]ackages/*rules in the same template. Without it,**/[Pp]ackages/*from VisualStudio.gitignore, which the template asks to be placed before its own rules, still hides the files insidepackages.What git does with each path, in a fresh repository (
git ls-files -o --exclude-standardplusgit check-ignore -v, git 2.50.1). Rows marked with*change:umbraco/Data/packages/package.zip***/umbraco/*umbraco/Data/packages/MyPackage/package.xml***/umbraco/*umbraco/models/Article.generated.csumbraco/Data/Umbraco.sqlite.db**/umbraco/Data/*)umbraco/Data/TEMP/DistCache/x.txt**/umbraco/Data/*)umbraco/Logs/log.json,umbraco/mediacache/a.jpg**/umbraco/*)wwwroot/umbraco/backoffice.jsThe result is the same with VisualStudio.gitignore placed before the template. With only the first three new lines, the two
packagesfiles stay ignored there by VisualStudio.gitignore's**/[Pp]ackages/*.Links to documentation supporting these rule changes
/*,!/foo,/foo/*,!/foo/bar).Constants.SystemDirectories.Packages = Data + "/packages", "The packages folder path for installed packages", whereDataisumbraco/Data: https://github.com/umbraco/Umbraco-CMS/blob/2d4418b36f0e50a1234cc8d9781b8e749d67f42d/src/Umbraco.Core/Constants-SystemDirectories.cs#L76-L78Merge and Approval Steps