bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50344: C-x v keybinding for vc-print-branch-log


From: Dmitry Gutov
Subject: bug#50344: C-x v keybinding for vc-print-branch-log
Date: Thu, 7 Oct 2021 03:47:32 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 06.10.2021 19:28, Juri Linkov wrote:
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.
But even the current branch creating command fails for git.
For example, 'C-u C-x v s new_branch RET' fails with the error:

   (error "Failed (status 1): git --no-pager update-index --refresh .")

and shows the*vc*  buffer saying that modified files need update.

Whereas `M-& git checkout -b new_branch` works fine with modified files.

All right, yes, the current behavior is weird. It's actually documented in the description of the 'create-tag' action:

;;   Attach the tag NAME to the state of the working copy.  This
;;   should make sure that files are up-to-date before proceeding with
;;   the action.

Perhaps ESR or Dan N. have a good justification for this, but it seems to me the contemporary expectation is that tags and branches are created from the committed revision history, and not from the "working copy".

Some backends may choose to enforce this kind of limitation, but the more modern ones like Git or Hg should skip the check IMHO.

And it seems, from looking at vc-hg-create-tag, Hg already skips it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]