We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91dc347 commit c1d9f02Copy full SHA for c1d9f02
src/utils.ts
@@ -40,6 +40,10 @@ export async function getCommitMessage(
40
diff = await repo.diff(false);
41
}
42
43
+ // if diff is empty, return the promise here
44
+ if (!diff) {
45
+ return Promise.reject('No changes to commit');
46
+ }
47
writeFileSync(tmpDiffFile, diff);
48
const cmd = `${gptcommit} prepare-commit-msg --commit-msg-file ${tmpMsgFile} --commit-source commit --git-diff-content ${tmpDiffFile}`;
49
channel.appendLine(`COMMAND: ${cmd}`);
0 commit comments