GNU bug report logs -
#62940
29.0.60; vc: no easy way to get diff of all outgoing changes
Previous Next
Full log
Message #64 received at 62940 <at> debbugs.gnu.org (full text, mbox):
BTW:
On 13/09/2024 23:54, Spencer Baugh wrote:
> +(defun vc-git-pushed-revision (_file &optional remote-location)
> + "Return the ref for REMOTE-LOCATION."
> + (if (and remote-location (not (string-empty-p remote-location)))
> + remote-location
> + "@{upstream}"))
The function above and the function below
+(defun vc-hg-pushed-revision (_file &optional remote-location)
> + "Return a revspec for the last commit not outgoing to REMOTE-LOCATION."
> + (unless remote-location
> + (setq remote-location ""))
> + (format "last(. and not outgoing(%s))" remote-location))
...seem to be describing different kinds of refs: I think the Hg version
refers to the last commit from the current branch that's present in the
remote (the merge base), whereas the Git version points to the tip of
the remote branch.
Which will be different if the remote has some newer changes added
(perhaps someone else has pushed to it). vc-git-log-outgoing won't
notice the difference because it uses the ".." range, but vc-git-diff
compares two versions directly, so e.g. anything new added to the remote
will be shown as removed in such diff.
We probably want "merge base with remote" for Git as well (git
merge-base @{upstream} HEAD), but it doesn't have a similar short ref
syntax.
Could use "merge-base(@{upstream})" or "@{upstream}.." as a special
value, maybe.
This bug report was last modified 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.