fix: resolve module structure issues by separating CLI and git modules
Some checks failed
CI / build (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
- Removed duplicated git module code from cli.rs - Created dedicated git.rs module with GitRepo, StagedChanges, ChangedFile, FileStatus definitions - Updated all modules (analyzer, generator, prompt) to import from super::git - Fixed module organization to resolve compilation errors
This commit is contained in:
@@ -23,8 +23,7 @@ fn main() -> Result<()> {
|
||||
if staged.files.is_empty() {
|
||||
println!(
|
||||
"{}",
|
||||
"No staged changes found. Please stage your changes first with 'git add'."
|
||||
.yellow()
|
||||
"No staged changes found. Please stage your changes first with 'git add'.".yellow()
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
@@ -53,14 +52,14 @@ fn main() -> Result<()> {
|
||||
|
||||
if args.dry_run {
|
||||
println!("{}", "\n[DRY RUN] Commit message preview:".bold().blue());
|
||||
println!("\n{}", message.bright_white().on_blue());
|
||||
println!("\n{}\n", message.bright_white().on_blue());
|
||||
println!("{}", "No changes were made.".yellow());
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if args.no_interactive {
|
||||
println!("{}", "\nGenerated commit message:".bold().green());
|
||||
println!("\n{}", message.bright_white().on_blue());
|
||||
println!("\n{}\n", message.bright_white().on_blue());
|
||||
|
||||
let confirm = dialoguer::Confirm::with_theme(&dialoguer::theme::ColorfulTheme::default())
|
||||
.with_prompt("Proceed with commit?")
|
||||
|
||||
Reference in New Issue
Block a user