From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#50344: C-x v keybinding for vc-print-branch-log Date: Wed, 6 Oct 2021 03:37:01 +0300 Message-ID: <30b7d470-26b1-7d7a-2d43-9e85059c1fc5@yandex.ru> References: <87mtoux1ha.fsf@mail.linkov.net> <1f39aa34-6626-3d0b-d764-2c9908787d99@yandex.ru> <87o8998wf4.fsf@mail.linkov.net> <84e4e2ef-6c8d-3645-9e1e-3129981dd45f@yandex.ru> <875yvgvohe.fsf@gnus.org> <87y28burzd.fsf@mail.linkov.net> <87o896kt5k.fsf@gnus.org> <87sfyhj3qw.fsf@mail.linkov.net> <87zgsoctoc.fsf@gnus.org> <59a05468-2309-c6e7-5a2a-51426c208966@yandex.ru> <87tuiv4hvc.fsf@gnus.org> <87fsudsngq.fsf@mail.linkov.net> <85dfa858-091b-80df-b9d1-bd1136c2b91e@yandex.ru> <878rz72wqg.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36524"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: 50344@debbugs.gnu.org, Lars Ingebrigtsen To: Juri Linkov , Filipp Gunbin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 06 02:38:18 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXuws-0009Iy-3w for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Oct 2021 02:38:18 +0200 Original-Received: from localhost ([::1]:39898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXuwq-0007MM-3l for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 20:38:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXuwd-0007MD-B5 for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 20:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXuwb-0006wu-Q6 for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 20:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXuwb-0005rf-Hr for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 20:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Oct 2021 00:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50344 X-GNU-PR-Package: emacs Original-Received: via spool by 50344-submit@debbugs.gnu.org id=B50344.163348063422485 (code B ref 50344); Wed, 06 Oct 2021 00:38:01 +0000 Original-Received: (at 50344) by debbugs.gnu.org; 6 Oct 2021 00:37:14 +0000 Original-Received: from localhost ([127.0.0.1]:42140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXuvq-0005qb-Ar for submit@debbugs.gnu.org; Tue, 05 Oct 2021 20:37:14 -0400 Original-Received: from mail-lf1-f53.google.com ([209.85.167.53]:33567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXuvl-0005qJ-Cz for 50344@debbugs.gnu.org; Tue, 05 Oct 2021 20:37:12 -0400 Original-Received: by mail-lf1-f53.google.com with SMTP id y23so3260029lfb.0 for <50344@debbugs.gnu.org>; Tue, 05 Oct 2021 17:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AInoOrHQNdnnNyWdIGxNZfygERPgXiMJ7KwBvIUz5Cs=; b=l+CzYSavp0TvK2I2flafwAXEPBbmMjVBE2wV/rufce0O5xf68+ZyrOGPjIMjEkuWSs wU4eRIbc94a0EE5UpEhBDxiJNLQSPDugnN6G9gDEXCQneHPvWnFvMOBEaAsQHE5UlHm+ tllYd0lPMb9ykoo7B9eODU2Et6OjX3sDdd5dOc2NJd1Jnn18Z9Kb4m8OP+BtWN3v0ZYF 51uZaWBCDgSDe6WSjcvTb+fBTVrUFpR6/M4JssCh/pq9s0ExIOjD4alU3isVzFG4L7f+ 1zMUfNdQMLTkdiN3akU5BsIzDYaAJv2YYE+Dnjx+zYOS99N42mqMa1XP2y2rfcgfMRLy b9Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AInoOrHQNdnnNyWdIGxNZfygERPgXiMJ7KwBvIUz5Cs=; b=glTl9g2SAhKklehx9Cuft/TOh2MPi89DLwbF/VtDwUyQL2qxkW7VQrIs3P44kBv5Tw gMi4HsAAsAuIJersYpmP6nuTl1L8QO/Tn5GLmPOA/xQFmghwBsYMvJ1MIvFPbUfl1eR+ 1z3t7NLiw8st7bx5om39dkk8DtQ4fSL8SBdt0pf/yD4RLPSd5vPAseDO5xS9kq51f1nD /N4LDDaQNHpi4vKhM6Fl70Jod85tP7BtrFG1dilg1Uoy2D1jMc5Khmowc2FB8rgxxK3z cHEqDSlYFu66q54M3qnGMzbmYbHVUeTDM3Uxl8eGbJG411WW6N8vxmFDSO3wStj276dI U57g== X-Gm-Message-State: AOAM532lKkXLCye4Ko/a6D9UidzbgdQLfr0sfTr12y3TWuMrd42lXntP lP8LVMnYkYf5k/1nMG6/JcY= X-Google-Smtp-Source: ABdhPJx3bK1ztDDT6+2DL/O0VQGUyhDYbxlJUuz1puXG6W+PmAXzV8RTkSXw1Osm7ZI+nu4mPVn6Pw== X-Received: by 2002:a05:6512:39ca:: with SMTP id k10mr6405169lfu.571.1633480623172; Tue, 05 Oct 2021 17:37:03 -0700 (PDT) Original-Received: from [192.168.1.113] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id b4sm359167ljf.66.2021.10.05.17.37.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Oct 2021 17:37:02 -0700 (PDT) In-Reply-To: <878rz72wqg.fsf@mail.linkov.net> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216509 Archived-At: 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).