gityo 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -197973,13 +197973,7 @@ async function mainController(options = {}) {
|
|
|
197973
197973
|
let finalCommitMessage = options.message?.trim() ?? "";
|
|
197974
197974
|
if (typeof options.message === "string" && finalCommitMessage.length === 0) throw new Error("Provided commit message cannot be empty.");
|
|
197975
197975
|
const files = await getChangedFiles(git);
|
|
197976
|
-
if (files.length === 0)
|
|
197977
|
-
console.log("No changed files found.");
|
|
197978
|
-
return;
|
|
197979
|
-
}
|
|
197980
|
-
const branchSummary = await git.branch();
|
|
197981
|
-
const branch = branchSummary.detached ? "(detached HEAD)" : branchSummary.current;
|
|
197982
|
-
console.log(`${source_default.cyan(" Branch:")} ${source_default.reset.bold(branch)}`);
|
|
197976
|
+
if (files.length === 0) return console.log("No changed files found.");
|
|
197983
197977
|
const { diff, hasStaged } = await getCommitDiff(git);
|
|
197984
197978
|
if (finalCommitMessage.length > 0) {
|
|
197985
197979
|
console.log(source_default.yellow.dim("✓ Using provided commit message"));
|