mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-06 09:41:27 +03:00
snapshots for move hunk include branch name
This commit is contained in:
parent
2110c26680
commit
8bae084518
@ -122,7 +122,7 @@
|
|||||||
restored_from: {entry.details?.trailers
|
restored_from: {entry.details?.trailers
|
||||||
.find((t) => t.key === 'restored_from')
|
.find((t) => t.key === 'restored_from')
|
||||||
?.value?.slice(0, 7)}
|
?.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}
|
name: {entry.details?.trailers.find((t) => t.key === 'name')?.value}
|
||||||
{:else if ['ReorderBranches', 'UpdateBranchName', 'SelectDefaultVirtualBranch', 'UpdateBranchRemoteName'].includes(entry.details?.operation || '')}
|
{:else if ['ReorderBranches', 'UpdateBranchName', 'SelectDefaultVirtualBranch', 'UpdateBranchRemoteName'].includes(entry.details?.operation || '')}
|
||||||
<div>
|
<div>
|
||||||
|
@ -96,7 +96,10 @@ impl<T: Oplog> Snapshot for T {
|
|||||||
update: BranchUpdateRequest,
|
update: BranchUpdateRequest,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
let details = if update.ownership.is_some() {
|
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 {
|
} else if let Some(name) = update.name {
|
||||||
SnapshotDetails::new(OperationType::UpdateBranchName).with_trailers(vec![
|
SnapshotDetails::new(OperationType::UpdateBranchName).with_trailers(vec![
|
||||||
Trailer {
|
Trailer {
|
||||||
|
Loading…
Reference in New Issue
Block a user