add action for log change file diff

[?]
May 8, 2025, 6:10 PM
FR52XEMWD22VH3GKSARXJUJXOGO7ZSQEHWPXFRWHLGRAJU3WRKCAC

Dependencies

  • [2] WT3GA27P add cursor with selection
  • [3] YBJRDOTC make all repo actions async
  • [4] 4WO3ZJM2 show untracked files' contents
  • [5] AMPZ2BXK show changed files diffs (only Edit atm)
  • [6] JE44NYHM display log files diffs
  • [7] 4ELJZGRJ load and store all change diffs at once
  • [8] HC7ROIBC move main diffs state out of cursor
  • [*] 6YZAVBWU Initial commit

Change contents

  • edit in crates/inflorescence/src/main.rs at line 243
    [5.1921]
    [2.735]
    LogChangeFileDiffAction {
    hash: pijul::Hash,
    file: String,
    action: diff::Action,
    },
  • edit in crates/inflorescence/src/main.rs at line 1093
    [4.7404]
    [3.14755]
    Message::LogChangeFileDiffAction { hash, file, action } => {
    if let Some(cursor::Selection::LogChange {
    ix: _,
    hash: selected_hash,
    message: _,
    diffs: Some(diffs),
    file:
    Some(cursor::LogChangeFileSelection {
    ix: _,
    path: selected_path,
    }),
    }) = state.cursor.selection.as_mut()
    {
    if *selected_hash == hash && *selected_path == file {
    let (_file, state) = diffs.get_mut(&file).unwrap();
    diff::update(state, action);
    }
    }
    Task::none()
    }
  • replacement in crates/inflorescence/src/main.rs at line 1584
    [7.11924][8.2076:2152]()
    diff::view(Some(state), file).map(|action| todo!())
    [7.11924]
    [6.19347]
    diff::view(Some(state), file).map(|action| {
    Message::LogChangeFileDiffAction {
    hash: *hash,
    file: path.clone(),
    action,
    }
    })