Skip to content

Commit 495437c

Browse files
Philipp Hinrichsenjimthedev
Philipp Hinrichsen
authored andcommitted
feat(strategies): respect the --allow-emtpy flag (#477)
This adds the feature to respect the git `allow-empty` flag and enable git cz to create empty commits. #476
1 parent 07b92bc commit 495437c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/strategies/git-cz.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function gitCz (rawGitArgs, environment, adapterConfig) {
5252
throw error;
5353
}
5454

55-
if (stagingIsClean) {
55+
if (stagingIsClean && !parsedGitCzArgs.includes('--allow-empty')) {
5656
throw new Error('No files added to staging! Did you forget to run git add?');
5757
}
5858

0 commit comments

Comments
 (0)