Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/git_ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,10 @@ impl GitOperations for GitOpsManager {
if let Ok(content) = std::fs::read_to_string(&gitmodules_path) {
let mut new_content = String::new();
let mut in_target_section = false;
let target_name = format!("\"{}\"", opts.name);
for line in content.lines() {
if line.starts_with("[submodule \"") {
in_target_section = line.contains(&format!("\"{}\"", opts.name));
in_target_section = line.contains(&target_name);
}
if !in_target_section {
new_content.push_str(line);
Expand Down
Loading