Skip to content

[Feature] Combine all commits in a branch and display a unified diff per changed file #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leoluz opened this issue Sep 1, 2023 · 1 comment
Labels
stale The issue or PR has grown stale due to inactivity

Comments

@leoluz
Copy link

leoluz commented Sep 1, 2023

First of all thank you for your work and congrats for your amazing plugin!

Use-case: As reviewer I would like to see all diffs from different commits in a branch combined in a single view so I can easily reason about how the final state will look like once merged.

Longer explanation:
PRs are often composed by multiple commits. While we progress in the review, contributors will modify their previous commits. By looking at individual commits is very challenging to understand how the final state of a given file is going to be. To address this problem, it would be great if this plugin could combine diffs from all commits in a given file in a given branch.

Sorry if this was already discussed in the past. I quickly looked at the opened issues but didn't find anything at first.

@sindrets
Copy link
Owner

sindrets commented Sep 1, 2023

The feature request for unified diffs is tracked here: #39.

Use-case: As reviewer I would like to see all diffs from different commits in a branch combined in a single view so I can easily reason about how the final state will look like once merged.

If I understand you correctly you want to diff the head of a feature branch against it's merge-base? This is already possible. You can compare the state between any two Git revs with :DiffviewOpen {REV1}..{REV2}. Git also has a shorthand for describing the range between any rev and it's merge-base - the triple-dot notation:

:DiffviewOpen origin/HEAD...HEAD

This is described under :h :DiffviewOpen, and also in USAGE.md.

@sindrets sindrets added the stale The issue or PR has grown stale due to inactivity label Sep 10, 2023
@sindrets sindrets closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The issue or PR has grown stale due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants