Skip to content

Commit 38775a6

Browse files
committed
fix(core): Improve interactive commit group skippi
Added interactive prompts for skipping commit groups and quitting the process. This allows users to handle problematic commit groups gracefully without proceeding with the commit. Affected files: - M smart_git_commit/smart_git_commit.py
1 parent d26a15d commit 38775a6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

smart_git_commit/smart_git_commit.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,8 +2155,12 @@ def execute_commits(self, interactive: bool = True) -> None:
21552155
print(f" [{Colors.YELLOW}s{Colors.RESET}] Skip this commit group")
21562156
print(f" [{Colors.RED}q{Colors.RESET}] Quit without committing")
21572157

2158-
choice = input(f"\n{Colors.BOLD}Commit these changes? [y/e/s/q]: {Colors.RESET}").lower()
2159-
if choice == 'q':
2158+
choice = input(f"\n{Colors.BOLD}Commit these changes? [Y/e/s/q]: {Colors.RESET}").lower()
2159+
# Empty input (pressing Enter) defaults to "y"
2160+
if choice == "" or choice == "y":
2161+
# Continue with the commit (default behavior)
2162+
pass
2163+
elif choice == 'q':
21602164
print(f"{Colors.YELLOW}Quitting commit operation.{Colors.RESET}")
21612165
self._revert_staged_changes()
21622166
return

0 commit comments

Comments
 (0)