mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-20 11:25:34 +00:00
rewrite: make MoveCommitStats
derive Default
This commit is contained in:
parent
5bd55f2981
commit
9927a9856e
1 changed files with 2 additions and 6 deletions
|
@ -459,6 +459,7 @@ impl<'settings, 'repo> DescendantRebaser<'settings, 'repo> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct MoveCommitsStats {
|
||||
/// The number of commits in the target set which were rebased.
|
||||
pub num_rebased_targets: u32,
|
||||
|
@ -493,12 +494,7 @@ pub fn move_commits(
|
|||
options: &RebaseOptions,
|
||||
) -> BackendResult<MoveCommitsStats> {
|
||||
if target_commits.is_empty() {
|
||||
return Ok(MoveCommitsStats {
|
||||
num_rebased_targets: 0,
|
||||
num_rebased_descendants: 0,
|
||||
num_skipped_rebases: 0,
|
||||
num_abandoned: 0,
|
||||
});
|
||||
return Ok(MoveCommitsStats::default());
|
||||
}
|
||||
|
||||
let target_commit_ids: HashSet<_> = target_commits.iter().ids().cloned().collect();
|
||||
|
|
Loading…
Reference in a new issue