>>> With your patch, I can pass some alternative upstream to the command, and >>> it fails at the end with something like: >>> >>> fatal: ambiguous argument 'HEAD..upstream': unknown revision or path not in >>> the working tree. >>> Use '--' to separate paths from revisions, like this: >>> 'git [...] -- [...]' >> But this means that my fix worked, because in vc-git-log-incoming >> I fixed the first command `git fetch`, but it fails in your case >> in the second command `git log HEAD..upstream`. > > If it works for you, go ahead. I just couldn't make the command work > (patched or not) with either of the projects I tried it on. Sorry for the delay, it took some time to realize that 'remote-location' in vc-log-incoming/outgoing is not a remote repository, but a remote branch name. In my tests remote repository and remote branch had the same name, so tests didn't fail when used remote repository names as remote branch names. The problem is that (info "(emacs) VC Change Log") contains wrong information: with a prefix argument, ‘vc-log-incoming’ prompts for a specific repository. Similarly, ‘C-x v O’ (‘vc-log-outgoing’) shows the changes that will be sent to another repository, the next time you run the push command; with a prefix argument, it prompts for a specific destination repository. A prefix argument reads not a repository, but a branch name. This patch fixes both problems: in vc-git-log-outgoing and in the documentation by using the same term 'remote-location' as the argument name in vc-log-incoming/outgoing: