Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent commit from being logged more than once
Browse files Browse the repository at this point in the history
cruessler committed Nov 3, 2024
1 parent b9f147a commit 5766ea0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gitoxide-core/src/repository/log.rs
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ fn log_file(repo: gix::Repository, out: &mut dyn std::io::Write, path: BString)
let topo = gix::traverse::commit::topo::Builder::from_iters(&repo.objects, [head.id], None::<Vec<gix::ObjectId>>)
.build()?;

for info in topo {
'outer: for info in topo {
let info = info?;
let commit = repo.find_commit(info.id).unwrap();

@@ -88,6 +88,11 @@ fn log_file(repo: gix::Repository, out: &mut dyn std::io::Write, path: BString)

if !modifications.is_empty() {
write_info(&repo, &mut *out, &info)?;

// We continue because we’ve already determined that this commit is part of the
// file’s history, so there’s no need to compare it to its other parents.

continue 'outer;
}
}
}

0 comments on commit 5766ea0

Please sign in to comment.