gitui-org / gitui-org/gitui

Enable reverse comparing between branches

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

描述

**Is your feature request related to a problem? Please describe.**
Currently (as far as I can tell) the compare function always shows the diffs with the branch that is currently checked out. This means that to see the diffs as they would in a PR, you have to checkout the branch you are merging to, instead of the one you are working on. As I like to see the PR I'm about to submit before committing/opening the PR, this is something I do fairly regularly and having to switch branches to do it is somewhat awkward.

**Describe the solution you'd like**
An option to flip the base of the diff when viewing patches.

**Describe alternatives you've considered**
- A shortcut to switch branches but that wouldn't really work in you don't have a clean working tree, which is most of the time in my experience.
- Changing the default to be flipped compared to what it is now, but this would be a breaking change compared to what it is now and I'm not sure how many people this would piss off. I guess this might be an option if the extra option is not desirable, but it seems a little excessive to me.
**Additional context**
Sounds like a not too complicated feature although I'm not familiar with the code base. If there is interest in this feature and someone willing to help guide/review work a little bit, I'd be open to making a PR for this myself.

贡献指南

打开贡献指南

调研方向

首先定位 compare 函数和补丁查看入口,然后追踪已检出分支如何成为 diff 基准。完成的标准是:通过一个显式选项切换该基准,而不需要切换分支;如果现有的 compare 行为已有测试,则添加或更新覆盖率。

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

评估

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

把新 issue 发到你的邮箱

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