mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 23:02:31 +03:00
Merge pull request #3763 from gitbutlerapp/move-hunk-branch-updates-implementation
snapshots for move hunk include branch name
This commit is contained in:
commit
569b792b34
@ -122,7 +122,7 @@
|
||||
restored_from: {entry.details?.trailers
|
||||
.find((t) => t.key === 'restored_from')
|
||||
?.value?.slice(0, 7)}
|
||||
{:else if ['DeleteBranch', 'CreateBranch', 'ApplyBranch', 'UnapplyBranch'].includes(entry.details?.operation || '')}
|
||||
{:else if ['DeleteBranch', 'CreateBranch', 'ApplyBranch', 'UnapplyBranch', 'MoveHunk'].includes(entry.details?.operation || '')}
|
||||
name: {entry.details?.trailers.find((t) => t.key === 'name')?.value}
|
||||
{:else if ['ReorderBranches', 'UpdateBranchName', 'SelectDefaultVirtualBranch', 'UpdateBranchRemoteName'].includes(entry.details?.operation || '')}
|
||||
<div>
|
||||
|
@ -96,7 +96,10 @@ impl<T: Oplog> Snapshot for T {
|
||||
update: BranchUpdateRequest,
|
||||
) -> anyhow::Result<()> {
|
||||
let details = if update.ownership.is_some() {
|
||||
SnapshotDetails::new(OperationType::MoveHunk)
|
||||
SnapshotDetails::new(OperationType::MoveHunk).with_trailers(vec![Trailer {
|
||||
key: "name".to_string(),
|
||||
value: old_branch.name.to_string(),
|
||||
}])
|
||||
} else if let Some(name) = update.name {
|
||||
SnapshotDetails::new(OperationType::UpdateBranchName).with_trailers(vec![
|
||||
Trailer {
|
||||
|
Loading…
Reference in New Issue
Block a user