From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57807: 29.0.50; Make vc-print-branch-log able to log multiple branches Date: Wed, 14 Sep 2022 20:41:35 +0300 Message-ID: <83sfkt26r4.fsf@gnu.org> References: <87czbxub4b.fsf@melete.silentflame.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3035"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57807@debbugs.gnu.org To: Sean Whitton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 20:03:38 2022 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 1oYWjZ-0000Tu-3q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 20:03:37 +0200 Original-Received: from localhost ([::1]:44782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYWjY-00057O-6J for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 14:03:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYWPf-0003jq-1N for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:43:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYWPe-0003IZ-PR for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYWPe-0000rE-G2 for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57807 X-GNU-PR-Package: emacs Original-Received: via spool by 57807-submit@debbugs.gnu.org id=B57807.16631773273229 (code B ref 57807); Wed, 14 Sep 2022 17:43:02 +0000 Original-Received: (at 57807) by debbugs.gnu.org; 14 Sep 2022 17:42:07 +0000 Original-Received: from localhost ([127.0.0.1]:56010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYWOj-0000pz-8G for submit@debbugs.gnu.org; Wed, 14 Sep 2022 13:42:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYWOe-0000pS-FV for 57807@debbugs.gnu.org; Wed, 14 Sep 2022 13:42:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYWOZ-0003Bj-8Y; Wed, 14 Sep 2022 13:41:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jaLtRXBCL95jdodm0uxFJpNzaBMy9+axO41p13PFQSw=; b=bVQRaVRr2e5t ON2HOQCV1au89KQWC3LlHkpdUlioonAK+qxFTuhDHLGA1T5E9+xcwLWFmOV9G6XjbuSk58GiIuQbg x0xdtZ4ArigevPo6+xKbjaU219PS2VPfJi3h3CbYNwynGSRPtyk59rYSNq9Jh0LMkFJ69ZD4Oj4GQ B3EqtngEryTsaqrCDfzfJ8MxKxUOXYZgyIOiZFFphiGDkdqCo9GamHnmdFb4pIV5Vm6KTYNvwFOtv ThnaWxZPa9uH3LtdVQ7hzfTGdQZaYnRCkNNVili8boG6d1FFiFQ+gb+f5gd4kxJ4B61tMlncoEJky XIdg0dryu9T3yt/9WZORKQ==; Original-Received: from [87.69.77.57] (port=4977 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYWOO-0007Bu-Md; Wed, 14 Sep 2022 13:41:54 -0400 In-Reply-To: <87czbxub4b.fsf@melete.silentflame.com> (message from Sean Whitton on Wed, 14 Sep 2022 10:19:48 -0700) 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:242507 Archived-At: > From: Sean Whitton > Date: Wed, 14 Sep 2022 10:19:48 -0700 > > vc-git-log-edit-mode is already able to properly understand git-log(1) > 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.) > > An example of a case in which it is useful to produce logs like this is > when you're trying to figure out how several feature branches relate to > each other and to the trunk. > > I don't think the idea of producing a log showing more than one branch > at once is fundamentally git-specific. So I would like to extend > vc-print-branch-log to allow logging more than one branch, or > alternatively, add a vc-print-branch-logs command. I believe that there > are two design issues, on which I'm requesting review/input: > > (1) Extending the VC history functions API to permit expressing a > request for the backend to print a log of multiple branches. We could > allow the START-REVISION argument to `print-log' to take a list of > branches, or add an additional optional argument > ADDITIONAL-START-REVISIONS. The latter seems more robust to me. > > (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. I'm not sure I understand: how is this different from what "C-x v L" already produces?