Issue #3115624 by martijn.cuppens, jungle, JeroenT, greg.1.anderson, Mile23: Scaffolding: Only add root files to gitignore
(cherry picked from commit e3e5937d5c
)
merge-requests/64/head
parent
580a8536d6
commit
2784f6a4b7
|
@ -61,7 +61,7 @@ class ManageGitIgnore {
|
|||
if (!$is_tracked && $scaffoldResult->isManaged()) {
|
||||
$dir = realpath(dirname($path));
|
||||
$name = basename($path);
|
||||
$add_to_git_ignore[$dir][] = $name;
|
||||
$add_to_git_ignore[$dir][] = '/' . $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,18 +112,18 @@ class ManageGitIgnoreTest extends TestCase {
|
|||
$this->assertFileExists($sut . '/docroot/autoload.php');
|
||||
$this->assertFileExists($sut . '/docroot/index.php');
|
||||
$expected = <<<EOT
|
||||
build
|
||||
.csslintrc
|
||||
.editorconfig
|
||||
.eslintignore
|
||||
.eslintrc.json
|
||||
.gitattributes
|
||||
.ht.router.php
|
||||
autoload.php
|
||||
index.php
|
||||
robots.txt
|
||||
update.php
|
||||
web.config
|
||||
/build
|
||||
/.csslintrc
|
||||
/.editorconfig
|
||||
/.eslintignore
|
||||
/.eslintrc.json
|
||||
/.gitattributes
|
||||
/.ht.router.php
|
||||
/autoload.php
|
||||
/index.php
|
||||
/robots.txt
|
||||
/update.php
|
||||
/web.config
|
||||
EOT;
|
||||
// At this point we should have a .gitignore file, because although we did
|
||||
// not explicitly ask for .gitignore tracking, the vendor directory is not
|
||||
|
|
|
@ -1 +1 @@
|
|||
build
|
||||
/build
|
||||
|
|
Loading…
Reference in New Issue