diff --git a/src/CreateConventionalCommit.php b/src/CreateConventionalCommit.php index 32e0933..514ca1b 100644 --- a/src/CreateConventionalCommit.php +++ b/src/CreateConventionalCommit.php @@ -15,7 +15,7 @@ class CreateConventionalCommit public function __invoke(Subject $subject, Body $body, Footer $footer, bool $addAllToStage): void { if ($addAllToStage) { - $this->exec('git add .'); + $this->exec('git add -A'); } $safeSubject = escapeshellarg((string)$subject); diff --git a/tests/Unit/CreateConventionalCommitTest.php b/tests/Unit/CreateConventionalCommitTest.php index f8470db..796e95a 100644 --- a/tests/Unit/CreateConventionalCommitTest.php +++ b/tests/Unit/CreateConventionalCommitTest.php @@ -41,7 +41,7 @@ public function testCreateConventionalCommitWithAddAllFlag(): void ->expects($this->exactly(2)) ->method('exec') ->withConsecutive( - [$this->equalTo('git add .')], + [$this->equalTo('git add -A')], [$this->equalTo("git commit -m 'subject' -m 'body' -m 'footer'")] );