GNU bug report logs -
#57807
29.0.50; Make vc-print-branch-log able to log multiple branches
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Wed, 14 Sep 2022 17:20:02 UTC
Severity: normal
Found in version 29.0.50
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 57807 <at> debbugs.gnu.org (full text, mbox):
Hello,
On Wed 14 Sep 2022 at 10:17PM +03, Juri Linkov wrote:
>> vc-git-log-edit-mode is already able to properly understand git-log(1)
>
> I suppose vc-git-log-view-mode, not vc-git-log-edit-mode?
Yes, sorry.
>> output which logs multiple branches. Here's a hack to demonstrate that:
>>
>> (let ((default-directory "~/src/emacs/")
>> (vc-git-log-switches
>> (cons "origin/scratch/posix-spawn" vc-git-log-switches)))
>> (call-process-shell-command "git branch -f tmp 4b2ca6bfc0")
>> (vc-print-branch-log "tmp"))
>>
>> (4b2ca6bfc0 is an old tip of master close to scratch/posix-spawn.)
>
> Is this equivalent to `M-& git log origin/scratch/posix-spawn 4b2ca6bfc0`,
> then enabling vc-git-log-view-mode in the output buffer?
It's not, because vc-git-log-view-mode requires you pass four or five
options to git-log to get output it can properly display. That
knowledge is locked up in vc-git.el right now.
> Maybe vc-print-branch-logs, to keep the original vc-print-branch-log
> uncomplicated.
Perhaps a prefix argument?
>> (2) How could vc-print-branch-log prompt the user for multiple branch
>> names? Magit has the user separate branch names with commas, offering
>> completion for each branch name. But I suppose commas never appearing
>> in branch names is git-specific. So the command could prompt the user
>> repeatedly for branch names, until the user hits RET to input a
>> zero-length branch name, indicating they've input them all.
>
> Maybe by using completing-read-multiple with branch names separated
> by crm-separator, not necessarily comma?
I guess it would be a strange VC system that allows spaces in branch
names, huh?
--
Sean Whitton
This bug report was last modified 2 years and 314 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.