Subject: bug#62940: 29.0.60; vc: no easy way to get diff of all outgoing changes

From: Sean Whitton <[email-masked]>
Date: Sun, 11 May 2025 10:32:18 +0100

Hello,

On Fri 11 Oct 2024 at 11:10am -04, Spencer Baugh wrote:

> I think it's useful to think of these two options relative to
> vc-outgoing and vc-incoming.  Comparing $1 against $2 is equivalent to
> getting the diff from $3:
>
> - working-tree merge-base = vc-outgoing
> - merge-base remote-tip = vc-incoming
> - working-tree remote-tip = vc-outgoing+vc-incoming
>
> The first two are more useful than the third, I think, since the third
> mixes together two sorts of diffs, making it ambiguous which is which.

I agree that the first two are what is most useful.  The main use case
for seeing a diff of all outgoing changes is to see a summary of all
your outgoing work, and other people's incoming work isn't usually
relevant to that.  When it is relevant, it is so only after pulling and
rebasing or merging.

If that's right, then the notions of "incoming" and "outgoing" are
already well defined by vc-log-outgoing and vc-log-incoming and then I
don't think I follow the motivation for wanting to use the forward
completion mechanism with multiple possible forward completions.

I have a couple of proposals for what to add and change to resolve this
bug:

(1) Add a new vc-log-fileset-outgoing bound to C-x v o.  To get a diff
    of all outgoing changes, you would use either 'C-x v o C-x h =' or
    'C-x v O C-x h ='.

(2) Add these:
    C-x v o L -- vc-log-fileset-outgoing
    C-x v o D -- vc-diff-fileset-outgoing (equiv to 'C-x v o C-x h =' above)

    And a new defcustom which replaces the default C-x v O with these:
    C-x v O L -- vc-log-outgoing
    C-x v O D -- vc-diff-outgoing (equiv to 'C-x v O C-x h =' above)

I think I prefer option (2).  Would be great to hear from others, or if
I've missed something additional that's wanted.

-- 
Sean Whitton