gitui-org / gitui-org/gitui

edit only for head revision otherwise open as tempfile

未关闭
#2,147 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
feature-request good first issue
主要语言
Rust
星标
22.5k
派生
773
PR 合并指标
30 天内没有已合并 PR

描述

right now we show a `edit [e]` cmd for any file at any revision in file tree views. but we only open the file as it is currently on disk.

this means you don't see then what you expected when you looked at an old diff/revision. or worst case: the file is no longer present and will error.

we should only show `edit [e]` when you are at the head revision and otherwise two other options:
1. `open [o]` which will dump the revision of the file in a tempfile and open that
2. `go to head [g]` to jump the that file in the current file-tree (if it present)

2. is not as trivial and should probably be a separate issue (feel free to open that)

贡献指南

打开贡献指南

调研方向

Start in the file-tree view handling for the existing `edit [e]` command and trace how a selected revision is opened. Limit the change to showing edit only at the head revision and opening older revisions through the proposed `open [o]` tempfile behavior; treat `go to head [g]` as separate work. Done means old revisions open successfully without depending on the current on-disk file.

由索引模型根据 Issue 内容生成。

评估

技术栈
git, rust
领域
cli
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。