GNU bug report logs - #50344
C-x v keybinding for vc-print-branch-log

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 2 Sep 2021 18:46:01 UTC

Severity: wishlist

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #115 received at 50344 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>, Filipp Gunbin <fgunbin <at> fastmail.fm>
Cc: 50344 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#50344: C-x v keybinding for vc-print-branch-log
Date: Wed, 6 Oct 2021 03:37:01 +0300
On 05.10.2021 20:43, Juri Linkov wrote:

>> I'm also thinking of a separate command for branch creation, wrote all
>> that in bug#50643.  Thanks.
> 
> The following patch adds two new branch commands.
> 
>> However, I don't use tags much (besides creation - only "git fetch
>> --tags"), so I cannot add anything meaningful here.
>> Otherwise, the plan for C-x v b prefix looks great.
>> Other commands, like maybe "C-x v b r" - rename, could be added then.
> 
> I can't find the existing vc API method for renaming tags/branches.

I think that's OK.

>> The command could have a mode for specifying START-POINT, so for Git the
>> command becomes "git checkout -b new-branch-name START-POINT".  This
>> could be on C-u (unless there're other frequent "customization" cases).
> 
> The existing API method has no argument for START-POINT.
> Maybe every backend could handle its prefix arg directly
> from current-prefix-arg?  For example,
> 
>   (defun vc-git-create-tag (dir name branchp)
>     (if current-prefix-arg (completion-read "Start point: ") ...

Maybe we should add a new argument, an optional one. Then backends which 
don't support it can continue working without 'C-u' (we can make sure to 
call them with appropriate number of arguments) but will obviously fail 
when passed an extra argument. We could even catch the error and report 
that the backend doesn't support this feature.

But maybe the command should prompt for START-POINT by default: one 
doesn't create branches that often to be bothered by an extra RET, and 
it can be useful to verify the branch you are branching off of every 
time you do it. That would be my preferred behavior. And the 
implementation could be the same if we manage to treat RET as 
unspecified START-POINT.

As long as the ability to read and show the current ref/branch is there 
for most backends (to show it as the default input in the prompt).




This bug report was last modified 2 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.