Skip to content
Snippets Groups Projects
Unverified Commit 067348c6 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3115624 by martijn.cuppens, jungle, JeroenT, greg.1.anderson, Mile23:...

Issue #3115624 by martijn.cuppens, jungle, JeroenT, greg.1.anderson, Mile23: Scaffolding: Only add root files to gitignore

(cherry picked from commit e3e5937d)
parent 22a5ccaa
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ public function manageIgnored(array $files, ScaffoldOptions $options) {
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 @@ public function testManageGitIgnore() {
$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
......
build
\ No newline at end of file
/build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment