load and store all change diffs at once

[?]
May 8, 2025, 5:51 PM
4ELJZGRJNL6FXB33QTYDNPY57JA3WZPUXKLQRTGSLDM7W65PD3YQC

Dependencies

  • [2] WT3GA27P add cursor with selection
  • [3] EC3TVL4X add untracked files
  • [4] YBJRDOTC make all repo actions async
  • [5] A5YBC77V record!
  • [6] 4WO3ZJM2 show untracked files' contents
  • [7] V55EAIWQ add src file LRU cache
  • [8] NRCUG4R2 load changed files src when selected
  • [9] ZVI4AWER woot contents_diff
  • [10] OQ6HSAWH show record log
  • [11] NWJD6VM6 mv libflowers libflorescence
  • [12] AHWWRC73 navigate log entries
  • [13] UJPRF6DA fix log changes selection
  • [14] TEI5NQ3S add log files selection
  • [15] JE44NYHM display log files diffs
  • [16] ONRCENKT rm unnecessary state from repo's internal state
  • [17] D7A7MSIH allow to defer or abandon record, add buttons
  • [18] Y5ATDI2H convert changed file diffs and load src only if any needs it
  • [*] SWWE2R6M display basic repo stuff
  • [*] 6YZAVBWU Initial commit

Change contents

  • replacement in crates/libflorescence/src/repo.rs at line 136
    [15.14][15.14:58]()
    GetLogFileDiff {
    id: LogFileId,
    [15.14]
    [5.546]
    GetChangeDiffs {
    hash: pijul::Hash,
  • replacement in crates/libflorescence/src/repo.rs at line 145
    [16.34][16.34:89]()
    LogFileDiff { id: LogFileId, diffs: ChangedFile },
    [16.34]
    [4.723]
    GotChangeDiffs {
    hash: pijul::Hash,
    diffs: ChangedFiles,
    },
  • replacement in crates/libflorescence/src/repo.rs at line 227
    [15.331][15.331:471]()
    MsgIn::GetLogFileDiff { id } => {
    let LogFileId { change_hash, path } = id.clone();
    let diffs: ChangedFile;
    [15.331]
    [16.1017]
    MsgIn::GetChangeDiffs { hash } => {
    let diffs: ChangedFiles;
  • replacement in crates/libflorescence/src/repo.rs at line 230
    [16.1080][16.1080:1256](),[16.1256][15.628:668](),[15.628][15.628:668]()
    let change = internal_state
    .repo
    .changes
    .get_change(&change_hash)
    .unwrap();
    let mut changed_files =
    [16.1080]
    [16.1257]
    let change =
    internal_state.repo.changes.get_change(&hash).unwrap();
    let diffs =
  • edit in crates/libflorescence/src/repo.rs at line 234
    [16.1331][15.733:799](),[15.733][15.733:799]()
    let diffs = changed_files.remove(&path).unwrap();
  • replacement in crates/libflorescence/src/repo.rs at line 238
    [4.3030][15.831:903]()
    let _ = msg_out_tx.send(MsgOut::LogFileDiff { id, diffs });
    [4.3030]
    [4.3030]
    let _ = msg_out_tx.send(MsgOut::GotChangeDiffs { hash, diffs });
  • replacement in crates/inflorescence/src/main.rs at line 287
    [12.684][12.684:763]()
    let log_selection = |repo: &repo::State, ix: usize| -> cursor::Selection {
    [12.684]
    [15.1322]
    let log_selection = |repo: &repo::State,
    ix: usize|
    -> (cursor::Selection, Task<Message>) {
  • replacement in crates/inflorescence/src/main.rs at line 292
    [8.756][12.818:873]()
    cursor::Selection::LogChange {
    ix,
    [8.756]
    [12.873]
    // Request to get the diffs
    let task = Task::done(Message::ToRepo(repo::MsgIn::GetChangeDiffs {
  • replacement in crates/inflorescence/src/main.rs at line 295
    [12.903][15.1370:1414](),[15.1414][12.903:937](),[12.903][12.903:937]()
    message: entry.message.clone(),
    file: None,
    }
    [12.903]
    [12.937]
    }));
    (
    cursor::Selection::LogChange {
    ix,
    hash: entry.hash,
    message: entry.message.clone(),
    diffs: None,
    file: None,
    },
    task,
    )
  • replacement in crates/inflorescence/src/main.rs at line 309
    [12.945][15.1415:1940]()
    let log_file_selection =
    |log_entry: &repo::LogEntry,
    file_ix: usize,
    hash: pijul::Hash|
    -> (cursor::LogChangeFileSelection, Task<Message>) {
    let path = log_entry.file_paths.get(file_ix).unwrap().clone();
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
    path: path.clone(),
    };
    let task =
    Task::done(Message::ToRepo(repo::MsgIn::GetLogFileDiff { id }));
    [12.945]
    [14.356]
    let log_file_selection = |log_entry: &repo::LogEntry,
    file_ix: usize,
    hash: pijul::Hash|
    -> cursor::LogChangeFileSelection {
    let path = log_entry.file_paths.get(file_ix).unwrap().clone();
  • replacement in crates/inflorescence/src/main.rs at line 315
    [14.357][15.1941:2161]()
    (
    cursor::LogChangeFileSelection {
    ix: file_ix,
    path,
    diff: None,
    },
    task,
    )
    };
    [14.357]
    [14.533]
    cursor::LogChangeFileSelection { ix: file_ix, path }
    };
  • replacement in crates/inflorescence/src/main.rs at line 344
    [12.1210][15.2241:2281]()
    let selection =
    [12.1210]
    [12.1254]
    let (selection, task) =
  • replacement in crates/inflorescence/src/main.rs at line 350
    [12.1515][12.1515:1575]()
    changed_file_selection(
    [12.1515]
    [12.1575]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 355
    [12.1794][12.1794:1832]()
    )
    [12.1794]
    [12.1832]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 362
    [12.2054][6.3254:3316](),[9.5824][6.3254:3316](),[4.7561][6.3254:3316]()
    untracked_file_selection(
    [12.2054]
    [6.3316]
    let selection = untracked_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 367
    [7.3174][6.3553:3591](),[6.3553][6.3553:3591]()
    )
    [7.3174]
    [12.2055]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 372
    [12.2175][12.2175:2233]()
    untracked_file_selection(
    [12.2175]
    [12.2233]
    let selection = untracked_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 377
    [12.2436][12.2436:2470]()
    )
    [12.2436]
    [12.2470]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 380
    [12.2501][15.2321:2377]()
    (Some(selection), Task::none())
    [12.2501]
    [12.2545]
    (Some(selection), task)
  • replacement in crates/inflorescence/src/main.rs at line 387
    [12.2748][15.2378:2418]()
    let selection =
    [12.2748]
    [15.2418]
    let (selection, task) =
  • replacement in crates/inflorescence/src/main.rs at line 395
    [15.2819][15.2819:2881]()
    untracked_file_selection(
    [15.2819]
    [15.2881]
    let selection = untracked_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 400
    [15.3100][15.3100:3138]()
    )
    [15.3100]
    [15.3138]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 404
    [15.3227][15.3227:3287]()
    changed_file_selection(
    [15.3227]
    [15.3287]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 409
    [15.3506][15.3506:3544]()
    )
    [15.3506]
    [15.3544]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 414
    [15.3628][12.3633:3689](),[12.3633][12.3633:3689]()
    changed_file_selection(
    [15.3628]
    [12.3689]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 419
    [12.3892][12.3892:3926]()
    )
    [12.3892]
    [15.3629]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 422
    [15.3660][15.3660:3716]()
    (Some(selection), Task::none())
    [15.3660]
    [12.4374]
    (Some(selection), task)
  • edit in crates/inflorescence/src/main.rs at line 428
    [15.3750]
    [12.4513]
    diffs,
  • edit in crates/inflorescence/src/main.rs at line 435
    [14.754][15.3813:3854]()
    diff: _,
  • replacement in crates/inflorescence/src/main.rs at line 449
    [15.3984][15.3984:4055]()
    let (file, task) = log_file_selection(
    [15.3984]
    [15.4055]
    let file = log_file_selection(
  • edit in crates/inflorescence/src/main.rs at line 458
    [15.4401]
    [15.4401]
    diffs,
  • replacement in crates/inflorescence/src/main.rs at line 461
    [15.4498][15.4498:4540]()
    task,
    [15.4498]
    [14.1488]
    Task::none(),
  • replacement in crates/inflorescence/src/main.rs at line 465
    [12.4714][15.4541:4883]()
    let selection =
    if repo.log.len().saturating_sub(1)
    == log_ix
    {
    if !repo.untracked_files.is_empty() {
    let ix = 0;
    [12.4714]
    [15.4883]
    let (selection, task) = if repo
    .log
    .len()
    .saturating_sub(1)
    == log_ix
    {
    if !repo.untracked_files.is_empty() {
    let ix = 0;
    let selection =
  • replacement in crates/inflorescence/src/main.rs at line 479
    [15.5204][15.5204:6009]()
    )
    } else if !repo.changed_files.is_empty()
    {
    let ix = 0;
    changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    } else {
    let ix = 0;
    log_selection(repo, ix)
    }
    [15.5204]
    [12.5078]
    );
    (selection, Task::none())
    } else if !repo.changed_files.is_empty() {
    let ix = 0;
    let selection = changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 491
    [12.5123][15.6010:6071]()
    let ix = log_ix + 1;
    [12.5123]
    [12.5175]
    let ix = 0;
  • replacement in crates/inflorescence/src/main.rs at line 493
    [12.5239][15.6072:6169]()
    };
    (selection, Task::none())
    [12.5239]
    [3.5061]
    }
    } else {
    let ix = log_ix + 1;
    log_selection(repo, ix)
    };
    (selection, task)
  • replacement in crates/inflorescence/src/main.rs at line 504
    [12.5424][15.6219:6297](),[15.6297][12.5486:6185](),[12.5486][12.5486:6185](),[12.6185][13.18:190](),[13.190][12.6185:6251](),[12.6185][12.6185:6251](),[12.6251][15.6298:6375]()
    let selection = if !repo.untracked_files.is_empty() {
    let ix = 0;
    Some(untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    ))
    } else if !repo.changed_files.is_empty() {
    let ix = 0;
    Some(changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    ))
    } else if !repo.log.is_empty() {
    let ix = repo.log.len() - 1;
    Some(log_selection(repo, ix))
    } else {
    None
    };
    (selection, Task::none())
    [12.5424]
    [12.6252]
    let (selection, task) =
    if !repo.untracked_files.is_empty() {
    let ix = 0;
    let selection = Some(untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    ));
    (selection, Task::none())
    } else if !repo.changed_files.is_empty() {
    let ix = 0;
    let selection = Some(changed_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    ));
    (selection, Task::none())
    } else if !repo.log.is_empty() {
    let ix = repo.log.len() - 1;
    let (selection, task) = log_selection(repo, ix);
    (Some(selection), task)
    } else {
    (None, Task::none())
    };
    (selection, task)
  • replacement in crates/inflorescence/src/main.rs at line 547
    [9.8575][15.6579:6632]()
    let selection = if 0 == ix {
    [9.8575]
    [12.6294]
    let (selection, task) = if 0 == ix {
  • replacement in crates/inflorescence/src/main.rs at line 553
    [12.6607][12.6607:6663]()
    changed_file_selection(
    [12.6607]
    [6.4574]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 558
    [7.3670][6.4795:4829](),[6.4795][6.4795:4829]()
    )
    [7.3670]
    [4.9502]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 562
    [12.6737][12.6737:6795]()
    untracked_file_selection(
    [12.6737]
    [9.8637]
    let selection = untracked_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 567
    [8.2218][8.2218:2252]()
    )
    [8.2218]
    [4.9675]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 572
    [4.9751][6.4830:4884]()
    untracked_file_selection(
    [4.9751]
    [6.4884]
    let selection = untracked_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 577
    [7.3788][6.5089:5119](),[6.5089][6.5089:5119]()
    )
    [7.3788]
    [4.9814]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 580
    [4.9841][15.6633:6689]()
    (Some(selection), Task::none())
    [4.9841]
    [4.9885]
    (Some(selection), task)
  • replacement in crates/inflorescence/src/main.rs at line 587
    [9.8979][15.6690:6743]()
    let selection = if 0 == ix {
    [9.8979]
    [12.6796]
    let (selection, task) = if 0 == ix {
  • replacement in crates/inflorescence/src/main.rs at line 590
    [12.6935][12.6935:6993]()
    untracked_file_selection(
    [12.6935]
    [9.8980]
    let selection = untracked_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 595
    [8.2516][8.2516:2550]()
    )
    [8.2516]
    [12.6994]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 602
    [12.7244][12.7244:7300]()
    changed_file_selection(
    [12.7244]
    [6.5178]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 607
    [7.3914][6.5399:5433](),[6.5399][6.5399:5433]()
    )
    [7.3914]
    [4.10421]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 612
    [4.10497][8.2551:2603]()
    changed_file_selection(
    [4.10497]
    [9.9145]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 617
    [8.2794][8.2794:2824]()
    )
    [8.2794]
    [4.10558]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 620
    [4.10585][15.6744:6800]()
    (Some(selection), Task::none())
    [4.10585]
    [10.4730]
    (Some(selection), task)
  • edit in crates/inflorescence/src/main.rs at line 626
    [15.6834]
    [14.1815]
    diffs,
  • edit in crates/inflorescence/src/main.rs at line 633
    [14.2026][15.6897:6938]()
    diff: _,
  • replacement in crates/inflorescence/src/main.rs at line 642
    [14.2443][15.7084:7155]()
    let (file, task) = log_file_selection(
    [14.2443]
    [15.7155]
    let file = log_file_selection(
  • edit in crates/inflorescence/src/main.rs at line 650
    [15.7500]
    [15.7500]
    diffs,
  • replacement in crates/inflorescence/src/main.rs at line 653
    [15.7597][15.7597:7639]()
    task,
    [15.7597]
    [14.2567]
    Task::none(),
  • replacement in crates/inflorescence/src/main.rs at line 657
    [12.7523][15.7640:7705]()
    let selection = if 0 == log_ix {
    [12.7523]
    [12.7569]
    let (selection, task) = if 0 == log_ix {
  • replacement in crates/inflorescence/src/main.rs at line 660
    [12.7720][12.7720:7784]()
    changed_file_selection(
    [12.7720]
    [12.7784]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 665
    [12.8019][12.8019:8061]()
    )
    [12.8019]
    [12.8061]
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 669
    [12.8223][12.8223:8566]()
    untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    )
    [12.8223]
    [12.8566]
    let selection =
    untracked_file_selection(
    repo,
    ix,
    &mut state.diffs_cache,
    &state.src_file_load_tx,
    );
    (selection, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 685
    [15.7741][15.7741:7799]()
    (selection, Task::none())
    [15.7741]
    [12.8970]
    (selection, task)
  • replacement in crates/inflorescence/src/main.rs at line 691
    [4.10681][15.7849:7915]()
    let selection = if !repo.log.is_empty() {
    [4.10681]
    [13.241]
    let (selection, task) = if !repo.log.is_empty() {
  • replacement in crates/inflorescence/src/main.rs at line 693
    [13.298][13.298:356]()
    Some(log_selection(repo, ix))
    [13.298]
    [13.356]
    let (selection, task) = log_selection(repo, ix);
    (Some(selection), task)
  • replacement in crates/inflorescence/src/main.rs at line 697
    [4.11123][8.2825:2882]()
    Some(changed_file_selection(
    [4.11123]
    [9.9302]
    let selection = changed_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 702
    [8.3073][8.3073:3104]()
    ))
    [8.3073]
    [12.9133]
    );
    (Some(selection), Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 706
    [12.9271][12.9271:9330]()
    Some(untracked_file_selection(
    [12.9271]
    [12.9330]
    let selection = untracked_file_selection(
  • replacement in crates/inflorescence/src/main.rs at line 711
    [12.9517][12.9517:9548]()
    ))
    [12.9517]
    [12.9548]
    );
    (Some(selection), Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 714
    [12.9581][12.9581:9614]()
    None
    [12.9581]
    [15.7916]
    (None, Task::none())
  • replacement in crates/inflorescence/src/main.rs at line 716
    [15.7943][15.7943:7993]()
    (selection, Task::none())
    [15.7943]
    [2.2497]
    (selection, task)
  • edit in crates/inflorescence/src/main.rs at line 736
    [15.8447]
    [15.8447]
    diffs,
  • edit in crates/inflorescence/src/main.rs at line 744
    [14.3607][15.8688:8861](),[15.8861][14.3720:3776](),[14.3720][14.3720:3776](),[14.3776][15.8862:9077]()
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
    path: path.clone(),
    };
    let task = Task::done(Message::ToRepo(
    repo::MsgIn::GetLogFileDiff { id },
    ));
  • edit in crates/inflorescence/src/main.rs at line 748
    [15.9292][15.9292:9344]()
    diff: None,
  • replacement in crates/inflorescence/src/main.rs at line 749
    [15.9384][15.9384:9426]()
    task,
    [15.9384]
    [15.9426]
    Task::none(),
  • edit in crates/inflorescence/src/main.rs at line 759
    [15.9740]
    [15.9740]
    diffs,
  • edit in crates/inflorescence/src/main.rs at line 770
    [15.10112]
    [15.10112]
    diffs,
  • replacement in crates/inflorescence/src/main.rs at line 837
    [6.6175][15.11404:11473](),[15.11473][14.4913:4969](),[13.484][14.4913:4969](),[14.4969][13.535:593](),[13.535][13.535:593](),[13.593][15.11474:11507](),[15.11507][13.593:629](),[13.593][13.593:629](),[13.629][15.11508:11585]()
    cursor::Select::LogChange { ix, hash, message } => (
    Some(cursor::Selection::LogChange {
    ix,
    hash,
    message,
    file: None,
    }),
    Task::none(),
    ),
    [6.6175]
    [15.11585]
    cursor::Select::LogChange { ix, hash, message } => {
    // Request to get the diffs
    let task = Task::done(Message::ToRepo(
    repo::MsgIn::GetChangeDiffs { hash },
    ));
    (
    Some(cursor::Selection::LogChange {
    ix,
    hash,
    message,
    diffs: None,
    file: None,
    }),
    Task::none(),
    )
    }
  • edit in crates/inflorescence/src/main.rs at line 859
    [15.11798]
    [15.11798]
    diffs,
  • edit in crates/inflorescence/src/main.rs at line 862
    [15.11867][15.11867:12279]()
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
    path: path.clone(),
    };
    let task = Task::done(Message::ToRepo(
    repo::MsgIn::GetLogFileDiff { id },
    ));
  • edit in crates/inflorescence/src/main.rs at line 865
    [15.12434][15.12434:12478]()
    diff: None,
  • edit in crates/inflorescence/src/main.rs at line 871
    [15.12745]
    [15.12745]
    diffs,
  • replacement in crates/inflorescence/src/main.rs at line 874
    [15.12835][15.12835:12873]()
    task,
    [15.12835]
    [15.12873]
    Task::none(),
  • edit in crates/inflorescence/src/main.rs at line 1243
    [15.13930]
    [15.13930]
    diffs: _,
  • replacement in crates/inflorescence/src/main.rs at line 1246
    [15.13987][16.2512:2570]()
    let (selection, task) = match log
    [15.13987]
    [15.14079]
    // Request to get the diffs
    let task = Task::done(Message::ToRepo(
    repo::MsgIn::GetChangeDiffs { hash },
    ));
    let selection = log
  • replacement in crates/inflorescence/src/main.rs at line 1255
    [15.14225][15.14225:14377](),[15.14377][12.10119:10431](),[12.10119][12.10119:10431](),[12.10431][15.14378:14873](),[15.14873][12.10504:10616](),[12.10504][12.10504:10616](),[12.10616][15.14874:14979](),[15.14979][12.10658:10697](),[12.10658][12.10658:10697]()
    {
    Some((ix, entry)) => {
    let file_and_task = file.and_then(|file| {
    entry
    .file_paths
    .iter()
    .enumerate()
    .find(|(_ix, path)| *path == &file.path)
    .map(|(ix, path)| {
    // Request to get the diff
    let id = repo::LogFileId {
    change_hash: hash,
    path: path.clone(),
    };
    let task = Task::done(Message::ToRepo(repo::MsgIn::GetLogFileDiff { id }));
    (cursor::LogChangeFileSelection {
    ix,
    path: path.clone(),
    diff: None,
    }, task)
    })
    [15.14225]
    [12.10697]
    .map(|(ix, entry)| {
    let file = file.and_then(|file| {
    entry
    .file_paths
    .iter()
    .enumerate()
    .find(|(_ix, path)| *path == &file.path)
    .map(|(ix, path)| {
    cursor::LogChangeFileSelection {
    ix,
    path: path.clone(),
    }
    })
    });
    cursor::Selection::LogChange {
    ix,
    hash: entry.hash,
    message,
    diffs: None,
    file,
    }
  • edit in crates/inflorescence/src/main.rs at line 1277
    [12.10729][15.14980:15651](),[15.15651][12.10912:10942](),[12.10912][12.10912:10942](),[12.10942][15.15652:15737]()
    let (file, task) = match file_and_task {
    Some((file, task)) => (Some(file), task),
    None => (None, Task::none()),
    };
    (
    Some(cursor::Selection::LogChange {
    ix,
    hash: entry.hash,
    message,
    file,
    }),
    task,
    )
    }
    None => (None, Task::none()),
    };
  • replacement in crates/inflorescence/src/main.rs at line 1292
    [15.15938][15.15938:15991]()
    repo::MsgOut::LogFileDiff { id, diffs } => {
    [15.15938]
    [15.15991]
    repo::MsgOut::GotChangeDiffs { hash, diffs } => {
  • replacement in crates/inflorescence/src/main.rs at line 1297
    [15.16134][15.16134:16344]()
    file:
    Some(cursor::LogChangeFileSelection {
    ix: _,
    path: selected_path,
    diff,
    }),
    [15.16134]
    [15.16344]
    diffs: selection_diffs @ None,
    file: _,
  • replacement in crates/inflorescence/src/main.rs at line 1301
    [15.16407][15.16407:16888]()
    let repo::LogFileId { change_hash, path } = id;
    if *selected_hash == change_hash && *selected_path == path {
    // NOTE: using unknown encoding as we don't yet have the
    // file
    let file = diff::init_file(
    diff::FileContent::UnknownEncoding,
    Some(&diffs),
    );
    *diff = Some((diff::State::default(), file));
    [15.16407]
    [15.16888]
    if *selected_hash == hash {
    let diffs = diffs
    .into_iter()
    .map(|(path, diffs)| {
    // NOTE: using unknown encoding as we don't yet have
    // the file for past
    // changes
    let file = diff::init_file(
    diff::FileContent::UnknownEncoding,
    Some(&diffs),
    );
    (path, (file, diff::State::default()))
    })
    .collect();
    *selection_diffs = Some(diffs);
  • edit in crates/inflorescence/src/main.rs at line 1573
    [15.18191]
    [15.18191]
    diffs: _,
  • replacement in crates/inflorescence/src/main.rs at line 1602
    [15.18939][15.18939:19021]()
    file: Some(cursor::LogChangeFileSelection { ix: _, path, diff }),
    [15.18939]
    [15.19021]
    diffs,
    file: Some(cursor::LogChangeFileSelection { ix: _, path }),
  • replacement in crates/inflorescence/src/main.rs at line 1609
    [15.19203][15.19203:19277]()
    match diff {
    Some((state, file)) => {
    [15.19203]
    [15.19277]
    match diffs {
    Some(diffs) => {
    let (file, state) = diffs.get(path).unwrap();
  • edit in crates/inflorescence/src/cursor.rs at line 1
    [2.26]
    [11.581]
    use std::collections::HashMap;
  • edit in crates/inflorescence/src/cursor.rs at line 28
    [15.20907]
    [12.12576]
    /// All the diffs in this change keyed by file path. Loaded async and
    /// set to None only while loading. The `diff::State` is also
    /// in here so that is it preserved while navigating between files.
    diffs: Option<HashMap<String, (diff::File, diff::State)>>,
  • edit in crates/inflorescence/src/cursor.rs at line 40
    [12.12720][15.20908:20978]()
    /// Loaded async
    pub diff: Option<(diff::State, diff::File)>,