From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 31 13:59:41 2023 Received: (at submit) by debbugs.gnu.org; 31 Dec 2023 18:59:41 +0000 Received: from localhost ([127.0.0.1]:47023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK12D-0007PG-6W for submit@debbugs.gnu.org; Sun, 31 Dec 2023 13:59:41 -0500 Received: from lists.gnu.org ([2001:470:142::17]:45362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK12A-0007P2-AN for submit@debbugs.gnu.org; Sun, 31 Dec 2023 13:59:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rK123-0006Rz-Lw for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 13:59:31 -0500 Received: from omta040.useast.a.cloudfilter.net ([44.202.169.39]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rK11z-0005o9-Oc for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 13:59:31 -0500 Received: from eig-obgw-5005a.ext.cloudfilter.net ([10.0.29.234]) by cmsmtp with ESMTPS id Jwi1ryTLc6nOZK11mrXztq; Sun, 31 Dec 2023 18:59:14 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id K11krCLj11b9NK11lrDpVL; Sun, 31 Dec 2023 18:59:13 +0000 X-Authority-Analysis: v=2.4 cv=FLYIesks c=1 sm=1 tr=0 ts=6591ba01 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=0EhelHQs3MnrYptC:21 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=aR16PxjQAAAA:8 a=ppypH7EIkz0cGQEMvvwA:9 a=zbFvvTOBjyH4ze5LlUjX:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender :Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xboSO7YetI4TOXwO2QGy999/w2dJXHTmLBckG15V6qg=; b=ejR5kwIeEUVpFLJEeavk5MN2ko ENm2m84XDFeYpzIStnxTQ3Ibzc1qNDa9ssOUE4wdGTQ6jUmFjX8oZe+hjMpJIUTT6mYnMdcTbFKTo 9KBGr05XyhtECkvPll6AQqGSg; Received: from 71-211-161-25.hlrn.qwest.net ([71.211.161.25]:42508 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rK11k-001RUr-27; Sun, 31 Dec 2023 11:59:12 -0700 From: Tom Tromey To: bug-gnu-emacs@gnu.org Subject: 28.3; vc-dir fails when I have a certain branch checked out X-Attribution: Tom Date: Sun, 31 Dec 2023 11:59:11 -0700 Message-ID: <8734vici68.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.161.25 X-Source-L: No X-Exim-ID: 1rK11k-001RUr-27 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-161-25.hlrn.qwest.net (prentzel) [71.211.161.25]:42508 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKjtXRZQBBnMpy1vtzKh3atWAmO/70L0Pum87qFx091phFyB+0b4O9XlwZK+Je2TWkH4GpEt8sPf3OkHVVbP9kjtypiNSgYf69x+zfLcvutsaWlrP3Dd qR6Htu0+jIRT9sFLb1rBVzC36Plm698K+Qf5NeAN/wMq6t7yDU8ZrgcnqLKg9I5XZxyZ8skJO+GEzW+JL6GS6rB8JNhT5FqHypA= Received-SPF: permerror client-ip=44.202.169.39; envelope-from=tom@tromey.com; helo=omta040.useast.a.cloudfilter.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I use vc-dir frequently. When I check out one particular branch of my gdb repository, vc-dir fails with this error: vc-do-command: Failed (status 2): git --no-pager remote get-url . . The only thing that might be peculiar about this branch is that it uses another local branch as its tracking branch. If I check out other branches in this repository -- ones that track remote branches -- vc-dir works again. In GNU Emacs 28.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-23 built on fd97b702fbea4aa3b70f5e90b3f3f165 Windowing system distributor 'The X.Org Foundation', version 11.0.12201009 System Description: Fedora Linux 38 (Workstation Edition) Configured using: 'configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json --with-native-compilation build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Compilation Minor modes in effect: shell-dirtrack-mode: t which-function-mode: t erc-services-mode: t erc-networks-mode: t savehist-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /usr/share/emacs/28.3/lisp/play/bubbles /home/tromey/.emacs.d/elpa/dictionary-1.10/dictionary hides /usr/share/emacs/28.3/lisp/net/dictionary Features: (shadow emacsbug markdown-mode tcl m4-mode gud novice pcmpl-unix pcmpl-gnu two-column url-http url-gw url-auth sh-script smie executable dired-aux rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode facemenu nxml-util nxml-enc xmltok autoconf autoconf-mode gnus-html help-fns radix-tree url-cache org-bullets org-element avl-tree ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe ol-docview doc-view image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs org-loaddefs find-func flow-fill python tramp-sh term/xterm xterm face-remap goto-addr log-edit vc-annotate mule-util jka-compr find-dired texinfo texinfo-loaddefs find-file make-mode log-view pcvs-util vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs copyright pulse ffap scheme mailalias dabbrev supercite regi mail-hist ggtags hippie-exp etags fileloop generator xref project bug-reference vc-git cc-mode cc-fonts cc-guess cc-menus cc-cmds smerge-mode diff diff-mode shr-color mm-archive sort smiley gnus-cite mail-extr qp gnus-async gnus-bcklg gnus-ml disp-table misearch multi-isearch gnus-topic nndraft nnmh nnfolder utf-7 gnutls network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum shr kinsoku svg dom gnus-group gnus-undo smtpmail sendmail gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr add-log flyspell ispell diminish projectile ibuf-macs pcase edmacro kmacro grep compile text-property-search ibuf-ext ibuffer ibuffer-loaddefs dash appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete parse-time ls-lisp which-func imenu minimap autorevert filenotify cus-load erc-track erc-match erc-services erc-networks erc-hl-nicks easy-mmode color erc-button erc-fill erc-stamp wid-edit erc-goodies erc erc-backend iso8601 time-date thingatpt pp format-spec erc-loaddefs comp comp-cstr rx cl-extra help-mode warnings advice vc-dir ewoc vc vc-dispatcher cc-styles cc-align cc-engine cc-vars cc-defs ange-ftp comint ansi-color ring server savehist clang-rename clang-include-fixer let-alist clang-format xml finder-inf gdb-shell-autoloads lisppaste-autoloads pydoc-info-autoloads info-look info cl weblogger-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads xwidget-internal dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 2511390 280777) (symbols 48 68379 41) (strings 32 200925 47137) (string-bytes 1 9410331) (vectors 16 109364) (vector-slots 8 3054321 332806) (floats 8 532 632) (intervals 56 469509 4701) (buffers 992 1022)) From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 31 14:34:40 2023 Received: (at 68183) by debbugs.gnu.org; 31 Dec 2023 19:34:40 +0000 Received: from localhost ([127.0.0.1]:47049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK1a4-0007bL-7j for submit@debbugs.gnu.org; Sun, 31 Dec 2023 14:34:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK1a3-0007b9-1d for 68183@debbugs.gnu.org; Sun, 31 Dec 2023 14:34:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rK1Zv-0002bP-V2; Sun, 31 Dec 2023 14:34:31 -0500 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=QjRvMsGtqSRkSv5v4IDxuB/CLUFjB627o3ab6ApcDk4=; b=eSfgmooDBWM1 gUjkr2X0YEs3BxCL0CZlGXaRbCkXPCL+EnrydlaDf5qonva7K7ZllfQS5IJXGiOg296w0yXNa0sFW wcwa5vbKuMZ6bCYiufZyRX1FUaERXdc6zoVb6m+r1r9S3vesjkQzIToioIL5c6z/Aa7DB35Ty0HFo NAANfeRosWnL8CdjKvU0UxUvw5QjaFyzjC7V/J1HxAJ1r6imMex/qPkpBiiKNJbyIgCidh+yimp2+ k5VSLfrxgp78a38Kcs3/z+VjUZjftvXjtIKA3a1BnQj8BB4pEdNAflM74HHlru9Vjc6o6cwknlcac q7JVnrqhlUG5bIBz1C21SA==; Date: Sun, 31 Dec 2023 21:34:27 +0200 Message-Id: <83y1da17zw.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey In-Reply-To: <8734vici68.fsf@tromey.com> (message from Tom Tromey on Sun, 31 Dec 2023 11:59:11 -0700) Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out References: <8734vici68.fsf@tromey.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68183 Cc: 68183@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tom Tromey > Date: Sun, 31 Dec 2023 11:59:11 -0700 > > > I use vc-dir frequently. > > When I check out one particular branch of my gdb repository, vc-dir > fails with this error: > > vc-do-command: Failed (status 2): git --no-pager remote get-url . . > > The only thing that might be peculiar about this branch is that it uses > another local branch as its tracking branch. > > If I check out other branches in this repository -- ones that track > remote branches -- vc-dir works again. Thanks, but I think we'd appreciate a reproducible recipe for this: how can one create a Git repository which can be used to reproduce this issue? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 31 15:14:55 2023 Received: (at 68183) by debbugs.gnu.org; 31 Dec 2023 20:14:55 +0000 Received: from localhost ([127.0.0.1]:47089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK2D0-0005TO-RL for submit@debbugs.gnu.org; Sun, 31 Dec 2023 15:14:55 -0500 Received: from omta36.uswest2.a.cloudfilter.net ([35.89.44.35]:34414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK2Cy-0005T8-NK for 68183@debbugs.gnu.org; Sun, 31 Dec 2023 15:14:53 -0500 Received: from eig-obgw-5003a.ext.cloudfilter.net ([10.0.29.159]) by cmsmtp with ESMTPS id JpnnriTkrhqFdK2CrrBHtw; Sun, 31 Dec 2023 20:14:45 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id K2CprCgzknCfvK2CqrBmfj; Sun, 31 Dec 2023 20:14:44 +0000 X-Authority-Analysis: v=2.4 cv=KKpJsXJo c=1 sm=1 tr=0 ts=6591cbb4 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=pWoeRkTAhn0gI_Sx:21 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=jHcvXeUT7P7crG22YsgA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=u+v9Nlfe79cYoZr9A5xkCBnQvHy4reUfzQbwpcrI/0g=; b=bpOS+E93ZzayzVWuN5pzLYjYrW s2xeVssJqGjBZJl71Iqbii/OD9/Lw+qJoxuhEXFEIOR28I976gnTOdpcAsFvnnIqHC8uWjZbztk7X L2JsUyBRJSyTdCNpqhkaXE5GC; Received: from 71-211-161-25.hlrn.qwest.net ([71.211.161.25]:45196 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rK2Cp-002ICD-1e; Sun, 31 Dec 2023 13:14:43 -0700 From: Tom Tromey To: Eli Zaretskii Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> X-Attribution: Tom Date: Sun, 31 Dec 2023 13:14:42 -0700 In-Reply-To: <83y1da17zw.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 31 Dec 2023 21:34:27 +0200") Message-ID: <87y1dab03x.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.161.25 X-Source-L: No X-Exim-ID: 1rK2Cp-002ICD-1e X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-161-25.hlrn.qwest.net (prentzel) [71.211.161.25]:45196 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfG29zcPfFkqoVO/Q+jXm289ognvmpO4dZt6llKUxvcIHLKrCBWdfGhLwJtdu8ipR5bkib0fIr25tfkmlEv2m6Rt0vGEnMeU2Io2PagNYdNPar4RAZWYI gO3srRK26uHw9FYrtPdBU1inV6a7Hjaf9LK2u2B5M92/+7v7/ox9dWco/KCH69gmJXFXu72YvnkXc3wWRba7eKG1sQWLckSTnl4= X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Tom Tromey , 68183@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli> Thanks, but I think we'd appreciate a reproducible recipe for this: Eli> how can one create a Git repository which can be used to reproduce Eli> this issue? This worked for me: $ cd ~/Emacs/trunk # This is my Emacs git repository $ git checkout --track -b vc-dir-bug master branch 'vc-dir-bug' set up to track 'master'. Switched to a new branch 'vc-dir-bug' Now invoke vc-dir on that directory. Tom From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 03 04:46:53 2024 Received: (at 68183) by debbugs.gnu.org; 3 Jan 2024 09:46:53 +0000 Received: from localhost ([127.0.0.1]:51887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKxpt-0003rr-1X for submit@debbugs.gnu.org; Wed, 03 Jan 2024 04:46:53 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:61518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKxpq-0003rb-PG for 68183@debbugs.gnu.org; Wed, 03 Jan 2024 04:46:51 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40d8902da73so17291435e9.2 for <68183@debbugs.gnu.org>; Wed, 03 Jan 2024 01:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704275201; x=1704880001; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DdA7eC7P5dXfAFjxqDT36UTWemLzMtujT5LkY7PdCbM=; b=BfphXhqvrye19Xo75Q6gw/6x6GbI9peq4Ry2t8xIypO2qI3Db/V3o/vUvrwbjwo1uX 56mfWyWz/oXWoQHLlHUB1fF2Sbw4U6HqW/6xfJsgj2C7HwsEfkcZQS+rdh/hYBPex6Kf dCOvPQZZrGuIx6cmXhybV+sLQZ4pTN5CbgB4b2KE7sEPz2QW68G/ya3zQDGA8moVGb0E ok8NYFwpkTo277yVPL1niLYIUYyGVH8Qu7erFoCzg4MBrrW4WQHztIvYorzVC3e+REdM 7sODu9nGDac2mcWbJcqFDpkQkjGM9qK71f6nHnN7oL5e5RHxN3ntsc3mKUvcm18cYcPT by0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704275201; x=1704880001; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DdA7eC7P5dXfAFjxqDT36UTWemLzMtujT5LkY7PdCbM=; b=h6QSYhhIDkz6THWjHalms/C0BlIkqslBPaKbWD+m1nrGxmnYKw+hE9qd/cybHlGloS leFBDo4vyOmxkHrq2YXsd0xuamvTK0CAAGPqafQJ4kKc20RpjePOIoKr0c2WMBrTShXq DUq0eo6TmcOJQTlHQcm4Bd2ofmCIMhYs2TCC6pIWEZzBLPdMvjw1+HFdxePeQVBTzdqC mJNDOCj5wH5eXUCHlprQ2j3SmThIT+5e/Ecet3NqkeA42KTAW/ijvTQP5fEfAu6edfIt IZFS/QTXUjM4KwYkpo+KO/+USbglCRECjQY0EK/uNV/RbX+SAbsawkfxcu1j/jPSE6sJ wk7A== X-Gm-Message-State: AOJu0YzoptUio5Q9MNjdPZBu+qQW93jeEYKtcemHsE4L6kd0XlcK74gG xm9nvsiJ0arVj/JB60HtzIjgdfQW9aA= X-Google-Smtp-Source: AGHT+IFxWB71d/iUvMDUtDT+5QqbVEPLhYotivX3IIBlGtfxWnh+9EwlSvPTzUgNQFbZekzIGjQMMg== X-Received: by 2002:a05:600c:2313:b0:40d:81c3:2e2b with SMTP id 19-20020a05600c231300b0040d81c32e2bmr3862230wmo.60.1704275201206; Wed, 03 Jan 2024 01:46:41 -0800 (PST) Received: from hirondell ([2001:861:38ca:5f70:7347:9ec1:df7c:18ef]) by smtp.gmail.com with ESMTPSA id g15-20020a5d488f000000b00336e43e8e57sm18986333wrq.58.2024.01.03.01.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 01:46:40 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Tom Tromey Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <87y1dab03x.fsf@tromey.com> (Tom Tromey's message of "Sun, 31 Dec 2023 13:14:42 -0700") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> Date: Wed, 03 Jan 2024 10:46:39 +0100 Message-ID: <87h6jun400.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , 68183@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Tom Tromey writes: > Eli> Thanks, but I think we'd appreciate a reproducible recipe for this: > Eli> how can one create a Git repository which can be used to reproduce > Eli> this issue? > > This worked for me: > > $ cd ~/Emacs/trunk > # This is my Emacs git repository > $ git checkout --track -b vc-dir-bug master > branch 'vc-dir-bug' set up to track 'master'. > Switched to a new branch 'vc-dir-bug' > > > Now invoke vc-dir on that directory. I can reproduce; IIUC the salient point is setting start-point to a local revision when calling git checkout, by opposition to e.g. origin/master. Continuing off of your recipe: $ git branch --set-upstream-to origin/master Then M-x vc-dir works again. IIUC, to display Remote : https://git.savannah.gnu.org/git/emacs.git vc-git-dir-extra-headers runs 1. git config branch.vc-dir-bug.remote =E2=87=92 "." 2. (vc-git-repository-url "[=E2=80=A6 EMACS DIR =E2=80=A6]" ".") 1. git config remote...url =E2=87=92 error git-config(1) says that branch..remote is "." when is tracking a local branch, whereas branch..merge points to the local branch 'git pull' will resync with. Wonder what TRT would be for the purposes of vc-dir? (1) Drop the "Remote" header: the current branch is not sync'd with a remote branch, after all. (2) Print "Remote: https://git.savannah.gnu.org/git/emacs.git" by making vc-git-repository-url fall back to remote.origin.url when remote-name is ".". (3) Print "Remote: master" by making vc-git-dir-extra-headers fall back to branch..merge when .remote is ".". (4) Make vc-git-dir-extra-headers fall back to branch..merge>.remote. In our example, that would yield "Remote: https://git.savannah.gnu.org/git/emacs.git", but in general that seems unreliable, since that remote could be "." as well, and nothing prevents cycles AFAIU. IMO (3) would be the most robust, though maybe confusing (calling a local branch "remote"); (2) makes sense as well since vc-git-repository-url already falls back to remote.origin.url when remote-name is nil. (1) sounds trivially "robust" and "not too incorrect", but maybe not the most helpful. (4) is under-specified and I'm not convinced it is possible to make it generally useful. Hope I've not mis-diagnosed the problem; apologies for the noise if so. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 03:09:16 2024 Received: (at 68183) by debbugs.gnu.org; 12 Feb 2024 08:09:16 +0000 Received: from localhost ([127.0.0.1]:37454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZRNM-0000Mu-6B for submit@debbugs.gnu.org; Mon, 12 Feb 2024 03:09:16 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:59760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZRNK-0000MR-IO for 68183@debbugs.gnu.org; Mon, 12 Feb 2024 03:09:15 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4114e0a2936so255365e9.3 for <68183@debbugs.gnu.org>; Mon, 12 Feb 2024 00:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707725332; x=1708330132; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NiflmERF7196VPbGsPpcod27xG9qA9tkt4gJMbVtzfo=; b=ObKCbX/vNFUU3qRUxxUfwSknQoi7EoHZQdIHfj5V3SEcG724YOWckdTEgtwvlpWn5b yIDvrVPmH0hN0hi4ITn1PQKxeJE+c66fv4GOim/MlNkr8Vbn6GIZZg1uNu4kg32XibVi lj643dIbp1R3wwtKwrMNA3wMgEpJ90xFJr6bN/mrefAPemdo8sTe7YkhVUdwwrzSO9+b v2nYP/9jhbzoa+5ynDvs3q5ZaEY42heKZDPoJ7dY/4zDgDFzUuTZDiVIZbvZjl8rHtgU ZoiWCgdfH7rilGnyWFVYyS4FjVhHwAcqJSd0Ljz+SyUcvq6BjL7lJZoTmsTPMTO8mouA ln3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707725332; x=1708330132; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NiflmERF7196VPbGsPpcod27xG9qA9tkt4gJMbVtzfo=; b=BB7K8msDhzO+XKEKTUl7jnH7xzrsTB0q8qQ4tO5pnF5MjeHV8PL8JApp5SMV5caCgu gJoXSqr0rnYZ62W1uaCq0vhpz4RD4uoxHcTpRQ5Em2wKmax0O5PlEelpzof8JDLoU2rA bIw/Q07JMcr83FU8SXml5N65Mhj9ccUjQMPmk4Bvc3EDxW90T8NmaLk8n5qpppDmrZSQ nr0GM/oj47hNe1xH4Mvlujei97mq/g+XGKmJm//5u8FEHCHFtsaSSKXjSdakVJ41u7wS rhpQxLAL3RiMP62Gh5PKM/ww5CU6K4nVsk88Katc353BXv/+bHhH4pTHTbZbsExIe0Wy KEng== X-Forwarded-Encrypted: i=1; AJvYcCWKVj4fV5Zi0W25hZ0jwDgt3qs7LDBj9LvLDETjYJxKxzASVQ/HTy52p+AGlRtMdVFoC79lbUtwV13vjBgU1vD9RUmm04s= X-Gm-Message-State: AOJu0YyOmYbjkYVUcYeHwsZSR5WWhNPiGYNk58TItQ1W868aaY7N9XIl 6vLQ5eyzEUr+EPaLx55T6uTgEAJW4+8TTB8BxXMVIStEr/EH+GUo X-Google-Smtp-Source: AGHT+IGZdWERXjQb7MptpzfWe6C65X1jv6+2LWyP0wZidlgpCu5kW3R6RTs9PndJSDijOn0NSbJyrA== X-Received: by 2002:a05:600c:3b21:b0:40f:e3e0:181c with SMTP id m33-20020a05600c3b2100b0040fe3e0181cmr6038727wms.17.1707725331712; Mon, 12 Feb 2024 00:08:51 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWU4Rsc9rHnWKKuhfTYgDwvAIYmG/G5eoKIGwaJvjiEyzYwuHZ2cUe704bvh201FU1x+0mPnJq0zHodhb1lwKyxc7wHQfmKqsON9iI7sOp2Kiy/bxshhOjWwsbhJLQls5t7fr0Wab8WOQ== Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id s8-20020a7bc388000000b00410bca333b7sm3438828wmj.27.2024.02.12.00.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 00:08:51 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Tom Tromey Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <87h6jun400.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Wed, 03 Jan 2024 10:46:39 +0100") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> Date: Mon, 12 Feb 2024 09:08:50 +0100 Message-ID: <878r3q2jfx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: > Tom Tromey writes: > >> Eli> Thanks, but I think we'd appreciate a reproducible recipe for this: >> Eli> how can one create a Git repository which can be used to reproduce >> Eli> this issue? >> >> This worked for me: >> >> $ cd ~/Emacs/trunk >> # This is my Emacs git repository >> $ git checkout --track -b vc-dir-bug master >> branch 'vc-dir-bug' set up to track 'master'. >> Switched to a new branch 'vc-dir-bug' >> >> >> Now invoke vc-dir on that directory. > [=E2=80=A6] > git-config(1) says that branch..remote is "." when is > tracking a local branch, whereas branch..merge points to the local > branch 'git pull' will resync with. Wonder what TRT would be for the > purposes of vc-dir? Here's a patch. tl;dr (1) When branch..remote is ".", display=E2=80=A6 > Remote : none (tracking local branch) =E2=80=A6 instead of raising an error. (2) When branch..merge is set to BRANCH, display=E2=80=A6 > Tracking : BRANCH (3) Add tests, because why not. CC'ing Dmitry and Juri, whom my brain associates with vc-git maintenance (rightly or wrongly; apologies for the noise if the latter). I might be slow to respond for the next couple of weeks, so please feel free to adapt or dismiss the patch as convenient. FWIW, off the top of my head, * the test should probably have a (skip-unless (have-git-or-something)), * maybe "none (tracking local branch)" is not informative and we should ditch it, * maybe we should fall back to "origin", like vc-git-repository-url does, * rushed the ChangeLog entry; vc-git-test--run should also be declared as a "new helper" (and maybe I should spell out that I used it to not have to depend on vc-git-- internal functions), * maybe the new header deserves a NEWS entry. I can tackle any of the above (and any other feedback), though again, if someone has a vision and I don't answer in a timely manner, don't wait on me. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Fix-vc-dir-when-remote-Git-branch-is-local.patch Content-Transfer-Encoding: quoted-printable >From ba9b1f6f340a551acab0014c69f05f38191bd345 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?K=3DC3=3DA9vin=3D20Le=3D20Gouguec?=3D Date: Mon, 12 Feb 2024 08:29:19 +0100 Subject: [PATCH] Fix vc-dir when "remote" Git branch is local MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit While in there, add that "tracking" branch to the vc-dir buffer. For bug#68183. * lisp/vc/vc-git.el (vc-git-dir-extra-headers): Reduce boilerplate with new function 'vc-git--out-ok'; skip calling vc-git-repository-url when REMOTE is "."; display tracking branch; prefer "none ()" to "not ()" si= nce that reads more grammatically correct. (vc-git--out-ok): Add documentation. (vc-git--out-str): New function to easily get the output from a Git command. * test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo): New helper. (vc-git-test--run, vc-git-test-dir-track-local-branch): Check that vc-dir does not crash. --- lisp/vc/vc-git.el | 44 ++++++++++++++++++++++++------------ test/lisp/vc/vc-git-tests.el | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 456417e566e..bf3032e5537 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -817,27 +817,29 @@ vc-git--cmds-in-progress cmds)) =20 (defun vc-git-dir-extra-headers (dir) - (let ((str (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "symbolic-ref" "HEAD")))) + (let ((str (vc-git--out-str "symbolic-ref" "HEAD")) (stash-list (vc-git-stash-list)) (default-directory dir) (in-progress (vc-git--cmds-in-progress)) =20 - branch remote remote-url stash-button stash-string) + branch remote-url stash-button stash-string upstream-branch) (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) (progn (setq branch (match-string 2 str)) - (setq remote - (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "config" - (concat "branch." branch ".remote"))))) - (when (string-match "\\([^\n]+\\)" remote) - (setq remote (match-string 1 remote))) - (when (> (length remote) 0) - (setq remote-url (vc-git-repository-url dir remote)))) - (setq branch "not (detached HEAD)")) + (let ((remote (vc-git--out-str + "config" (concat "branch." branch ".remote"))) + (merge (vc-git--out-str + "config" (concat "branch." branch ".merge")))) + (when (string-match "\\([^\n]+\\)" remote) + (setq remote (match-string 1 remote))) + (pcase remote + ("." + (setq remote-url "none (tracking local branch)")) + ((pred (not string-empty-p)) + (setq remote-url (vc-git-repository-url dir remote)))) + (when (string-match "^\\(refs/heads/\\)?\\(.+\\)$" merge) + (setq upstream-branch (match-string 2 merge))))) + (setq branch "none (detached HEAD)")) (when stash-list (let* ((len (length stash-list)) (limit @@ -896,6 +898,11 @@ vc-git-dir-extra-headers (propertize "Remote : " 'face 'vc-dir-header) (propertize remote-url 'face 'vc-dir-header-value))) + (when upstream-branch + (concat + "\n" + (propertize "Tracking : " 'face 'vc-dir-header) + (propertize upstream-branch 'face 'vc-dir-header-value))) ;; For now just a heading, key bindings can be added later for variou= s bisect actions (when (memq 'bisect in-progress) (propertize "\nBisect : in progress" 'face 'vc-dir-status-warn= ing)) @@ -2219,8 +2226,17 @@ vc-git--call (apply #'process-file vc-git-program nil buffer nil "--no-pager" comma= nd args))) =20 (defun vc-git--out-ok (command &rest args) + "Run `git COMMAND ARGS...' and insert standard output in current buffer. +Return whether the process exited with status zero." (zerop (apply #'vc-git--call '(t nil) command args))) =20 +(defun vc-git--out-str (command &rest args) + "Run `git COMMAND ARGS...' and return standard output. +The exit status is ignored." + (with-output-to-string + (with-current-buffer standard-output + (apply #'vc-git--out-ok command args)))) + (defun vc-git--run-command-string (file &rest args) "Run a git command on FILE and return its output as string. FILE can be nil." diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index c52cd9c5875..1f8abe7b9b0 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -24,6 +24,8 @@ =20 ;;; Code: =20 +(require 'ert-x) +(require 'vc) (require 'vc-git) =20 (ert-deftest vc-git-test-program-version-general () @@ -81,4 +83,41 @@ vc-git-test-annotate-time (should-not (vc-git-annotate-time)) (should-not (vc-git-annotate-time)))) =20 +(defmacro vc-git-test--with-repo (name &rest body) + "Initialize a repository in a temporary directory and evaluate BODY. + +The current directory will be set to the top of that repository; NAME +will be bound to that directory's file name. Once BODY exits, the +directory will be deleted." + (declare (indent 1)) + `(ert-with-temp-directory ,name + (let ((default-directory ,name)) + (vc-create-repo 'Git) + ,@body))) + +(defun vc-git-test--run (&rest args) + "Run git ARGS=E2=80=A6, check for non-zero status, and return output." + (with-temp-buffer + (apply 'vc-git-command t 0 nil args) + (buffer-string))) + +(ert-deftest vc-git-test-dir-track-local-branch () + "Test that `vc-dir' works when tracking local branches. See bug#68183." + (vc-git-test--with-repo repo + ;; Create an initial commit to get a branch started. + (write-region "hello" nil "README") + (vc-git-test--run "add" "README") + (vc-git-test--run "commit" "-mFirst") + ;; Get current branch name lazily, to remain agnostic of + ;; init.defaultbranch. + (let ((upstream-branch + (string-trim (vc-git-test--run "branch" "--show-current")))) + (vc-git-test--run "checkout" "--track" "-b" "hack" upstream-branch) + (vc-dir default-directory) + (pcase-dolist (`(,header ,value) + `(("Branch" "hack") + ("Tracking" ,upstream-branch))) + (goto-char (point-min)) + (re-search-forward (format "^%s *: %s$" header value)))))) + ;;; vc-git-tests.el ends here --=20 2.43.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 14 14:58:12 2024 Received: (at 68183) by debbugs.gnu.org; 14 Feb 2024 19:58:12 +0000 Received: from localhost ([127.0.0.1]:53189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raLOV-0001wD-Dt for submit@debbugs.gnu.org; Wed, 14 Feb 2024 14:58:12 -0500 Received: from mail-wr1-f52.google.com ([209.85.221.52]:45282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raLOS-0001vz-PW for 68183@debbugs.gnu.org; Wed, 14 Feb 2024 14:58:09 -0500 Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3392b045e0aso38955f8f.2 for <68183@debbugs.gnu.org>; Wed, 14 Feb 2024 11:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707940604; x=1708545404; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=uvPFvjogh9/A5Ot22+sw7QlwP9igf6FX7tMa5u0nG54=; b=gOTZch+Cld4As2gS1vG0B+/vKo+VavsQCokwu/HIihA2TRcV3bsOjD8ZBAf4pn6++D 0kyonCZ9iAWv4p4bP4CuSZlbit4qTytHLZCnyx5Pnpw6skGPsrlqJz7i/OxXNv3YeeWO oKJjlTLVcydmREz81PkXen8EwDI9tQm6BEdIUAIMTfdDvr25cRV8fX0LJhQe9aQBrne9 TXRV8SidNnegma8V2J54aBUjRZZfifUWjzcuCSE2xuKw3CxdtFOhlxR4/TmPmR07+ACK DvqR8fNsM91u09fDWbIQzw9namv4XzHGPvAOtMqKVkQKqboK8ZYRSUPbn4ciek5eDPgD zRwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707940604; x=1708545404; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uvPFvjogh9/A5Ot22+sw7QlwP9igf6FX7tMa5u0nG54=; b=Y9XKqyi52dxgo1gHBaznrTOlUoeUNsvv5DRB2VosYGXhKHa5ZfoT1g0BN+BGkQaVIw CGW1DyjtEbtf79MRE0F9zdkY6gzruy7zsYBMC8ENSKe/BF1sJVu6hGfe82iO3egDrHBj 7BPyraaB2HjPKn1imnubNW6l9oFtqK5BKskQcbPep2cdDGrYQnnUv0osdbtvWsFL2x35 PO/JJrcTJxAb8wWuTHLW/RC0uvavA44xZ01WrYnC3dJfygdnOpsjmHlddBH7cx/rucqN F3EOkgRU3iXw3v4aW2xS+yi7q/t/PhHS37sU8IFSqb0FA4IkQDQRk9mZuwYfdDrnCP1J gmvg== X-Forwarded-Encrypted: i=1; AJvYcCX8oP31ZT2hsqWmWsMtabDjEw6Nabah71DLRLhUgf9PZPY5Kt/BQQ1ndUXNC2tdpMWiipWoPZ93ItnE+CSdqE4oKf/9SEU= X-Gm-Message-State: AOJu0YzTbtst3PmKVyWHSb5KE1W78t6eUmAkkthEMG4k1vz8ChVINePa 51GUUh3qGWIMOi+izhmMBg8JTSBucnRI9e2LAhjPzYhtksameYW7 X-Google-Smtp-Source: AGHT+IFnUjMWb2mKoyyRBhYTYBzUpg7njuoyL/HJ8AZqu4s1vep2uDbr2N5kEF0VYDniGKGRA06exg== X-Received: by 2002:adf:ce03:0:b0:33b:810c:7868 with SMTP id p3-20020adfce03000000b0033b810c7868mr2979980wrn.57.1707940604224; Wed, 14 Feb 2024 11:56:44 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWyBQrgA5fUZiq6NcfsOl4flaCfbQ4Uo8OFUoVOathgJ79VBfYQAr//o9dnxBH0pAmgwxAnxNHD5jIzbaTz9qWQ8aNo9e4k73VV9Rii2bhANILxlSjosrFATuImilrNmHnGNDtW Received: from hirondell ([89.207.171.57]) by smtp.gmail.com with ESMTPSA id e11-20020adffd0b000000b0033b583ba5e0sm13245390wrr.92.2024.02.14.11.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 11:56:43 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Tom Tromey Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <878r3q2jfx.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Mon, 12 Feb 2024 09:08:50 +0100") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> Date: Wed, 14 Feb 2024 20:56:28 +0100 Message-ID: <877cj6izv7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: > K=C3=A9vin Le Gouguec writes: > >> Tom Tromey writes: >> >>> Eli> Thanks, but I think we'd appreciate a reproducible recipe for this: >>> Eli> how can one create a Git repository which can be used to reproduce >>> Eli> this issue? >>> >>> This worked for me: >>> >>> $ cd ~/Emacs/trunk >>> # This is my Emacs git repository >>> $ git checkout --track -b vc-dir-bug master >>> branch 'vc-dir-bug' set up to track 'master'. >>> Switched to a new branch 'vc-dir-bug' >>> >>> >>> Now invoke vc-dir on that directory. >> [=E2=80=A6] > Here's a patch. [=E2=80=A6] And here's another revision, addressing most of the points below. WDY'allT? > * the test should probably have a (skip-unless (have-git-or-something)), Done. > * maybe "none (tracking local branch)" is not informative and we should > ditch it, > * maybe we should fall back to "origin", like vc-git-repository-url > does, FWIW, the current patch will show Branch : vc-dir-tracking-branch Tracking : origin/master Remote : https://git.savannah.gnu.org/git/emacs.git for my checkout of this work-in-progress patch, and Branch : vc-dir-bug Tracking : master Remote : none (tracking local branch) for a checkout made following Tom's recipe, and Branch : trunk for a fresh 'git init' with just a default branch. OT1H "none (tracking local branch)" is redundant with "Tracking" not being prefixed with "origin"; OTOH * stripping "Remote" altogether might confuse users - at least "tracking local branch" hints at what's going on, * Falling back to origin's URL might also cause confusion: users might then expect 'vc-pull' to fetch changes from that URL, which is not the case. So all in all I think the above is reasonably useful. > * rushed the ChangeLog entry; vc-git-test--run should also be declared > as a "new helper" (and maybe I should spell out that I used it to not > have to depend on vc-git-- internal functions), Done. > * maybe the new header deserves a NEWS entry. Maybe? --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-Fix-vc-dir-when-remote-Git-branch-is-local.patch Content-Transfer-Encoding: quoted-printable >From ccca29fe2cce9b8c3477fcd31c8b37b1d8a57e94 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?K=3DC3=3DA9vin=3D20Le=3D20Gouguec?=3D Date: Mon, 12 Feb 2024 08:29:19 +0100 Subject: [PATCH] Fix vc-dir when "remote" Git branch is local MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit While in there, add that "tracking" branch to the vc-dir buffer. For bug#68183. * lisp/vc/vc-git.el (vc-git-dir-extra-headers): Reduce boilerplate with new function 'vc-git--out-ok'; stop calling vc-git-repository-url when REMOTE is "." to avoid throwing an error; display tracking branch; prefer "none ()" to "not ()" since that reads more grammatically correct. (vc-git--out-ok): Add documentation. (vc-git--out-str): New function to easily get the output from a Git command. * test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo) (vc-git-test--run): New helpers, defined to steer clear of vc-git-- internal functions. (vc-git-test-dir-track-local-branch): Check that vc-dir does not crash. --- lisp/vc/vc-git.el | 46 +++++++++++++++++++++++++----------- test/lisp/vc/vc-git-tests.el | 40 +++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 14 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 456417e566e..b1d3dd533c6 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -817,27 +817,31 @@ vc-git--cmds-in-progress cmds)) =20 (defun vc-git-dir-extra-headers (dir) - (let ((str (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "symbolic-ref" "HEAD")))) + (let ((str (vc-git--out-str "symbolic-ref" "HEAD")) (stash-list (vc-git-stash-list)) (default-directory dir) (in-progress (vc-git--cmds-in-progress)) =20 - branch remote remote-url stash-button stash-string) + branch remote-url stash-button stash-string tracking-branch) (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) (progn (setq branch (match-string 2 str)) - (setq remote - (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "config" - (concat "branch." branch ".remote"))))) - (when (string-match "\\([^\n]+\\)" remote) - (setq remote (match-string 1 remote))) - (when (> (length remote) 0) - (setq remote-url (vc-git-repository-url dir remote)))) - (setq branch "not (detached HEAD)")) + (let ((remote (vc-git--out-str + "config" (concat "branch." branch ".remote"))) + (merge (vc-git--out-str + "config" (concat "branch." branch ".merge")))) + (when (string-match "\\([^\n]+\\)" remote) + (setq remote (match-string 1 remote))) + (when (string-match "^\\(refs/heads/\\)?\\(.+\\)$" merge) + (setq tracking-branch (match-string 2 merge))) + (pcase remote + ("." + (setq remote-url "none (tracking local branch)")) + ((pred (not string-empty-p)) + (setq + remote-url (vc-git-repository-url dir remote) + tracking-branch (concat remote "/" tracking-branch)))))) + (setq branch "none (detached HEAD)")) (when stash-list (let* ((len (length stash-list)) (limit @@ -890,6 +894,11 @@ vc-git-dir-extra-headers (propertize "Branch : " 'face 'vc-dir-header) (propertize branch 'face 'vc-dir-header-value) + (when tracking-branch + (concat + "\n" + (propertize "Tracking : " 'face 'vc-dir-header) + (propertize tracking-branch 'face 'vc-dir-header-value))) (when remote-url (concat "\n" @@ -2219,8 +2228,17 @@ vc-git--call (apply #'process-file vc-git-program nil buffer nil "--no-pager" comma= nd args))) =20 (defun vc-git--out-ok (command &rest args) + "Run `git COMMAND ARGS...' and insert standard output in current buffer. +Return whether the process exited with status zero." (zerop (apply #'vc-git--call '(t nil) command args))) =20 +(defun vc-git--out-str (command &rest args) + "Run `git COMMAND ARGS...' and return standard output. +The exit status is ignored." + (with-output-to-string + (with-current-buffer standard-output + (apply #'vc-git--out-ok command args)))) + (defun vc-git--run-command-string (file &rest args) "Run a git command on FILE and return its output as string. FILE can be nil." diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index c52cd9c5875..fd3e8ccd602 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -24,6 +24,8 @@ =20 ;;; Code: =20 +(require 'ert-x) +(require 'vc) (require 'vc-git) =20 (ert-deftest vc-git-test-program-version-general () @@ -81,4 +83,42 @@ vc-git-test-annotate-time (should-not (vc-git-annotate-time)) (should-not (vc-git-annotate-time)))) =20 +(defmacro vc-git-test--with-repo (name &rest body) + "Initialize a repository in a temporary directory and evaluate BODY. + +The current directory will be set to the top of that repository; NAME +will be bound to that directory's file name. Once BODY exits, the +directory will be deleted." + (declare (indent 1)) + `(ert-with-temp-directory ,name + (let ((default-directory ,name)) + (vc-create-repo 'Git) + ,@body))) + +(defun vc-git-test--run (&rest args) + "Run git ARGS=E2=80=A6, check for non-zero status, and return output." + (with-temp-buffer + (apply 'vc-git-command t 0 nil args) + (buffer-string))) + +(ert-deftest vc-git-test-dir-track-local-branch () + "Test that `vc-dir' works when tracking local branches. Bug#68183." + (skip-unless (executable-find vc-git-program)) + (vc-git-test--with-repo repo + ;; Create an initial commit to get a branch started. + (write-region "hello" nil "README") + (vc-git-test--run "add" "README") + (vc-git-test--run "commit" "-mFirst") + ;; Get current branch name lazily, to remain agnostic of + ;; init.defaultbranch. + (let ((upstream-branch + (string-trim (vc-git-test--run "branch" "--show-current")))) + (vc-git-test--run "checkout" "--track" "-b" "hack" upstream-branch) + (vc-dir default-directory) + (pcase-dolist (`(,header ,value) + `(("Branch" "hack") + ("Tracking" ,upstream-branch))) + (goto-char (point-min)) + (re-search-forward (format "^%s *: %s$" header value)))))) + ;;; vc-git-tests.el ends here --=20 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 13 16:05:37 2024 Received: (at 68183) by debbugs.gnu.org; 13 Mar 2024 20:05:37 +0000 Received: from localhost ([127.0.0.1]:47488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkUr2-0006Rk-NP for submit@debbugs.gnu.org; Wed, 13 Mar 2024 16:05:37 -0400 Received: from mail-qv1-f43.google.com ([209.85.219.43]:56413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkUr0-0006RR-H2 for 68183@debbugs.gnu.org; Wed, 13 Mar 2024 16:05:35 -0400 Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-690c5d7851dso1500206d6.0 for <68183@debbugs.gnu.org>; Wed, 13 Mar 2024 13:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710360233; x=1710965033; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SwOa0d5iEsj22k6rrMTfooiQpD1S2K1eu8qbBMYvQJw=; b=H06vLjTQYYWCLeQF3upq+Mk1T4Wp40RtTZYaMn6m5eY1dRvfYj8RkW/Yuqv+gzHsD+ j7eELxLvjcnp09boV8k2p6h2klyruThWyLhTwHdzuyLDBJ30fz4jgANz9vaziho+SAbX yQs6+w3rSbtIkfxWuakce5BNmkCW+piXpd70tbkPEZO6KXaOOFsPzItqSRds+BKBgY7+ y3IzVyUfpzE1K4FjLp6hY/V3ME0rqv0efbY8pevzXKprUXjABprzMemPqs9jIANnMbHk P7XU97xlLhrYnR9maqSigDrFKa9GWFPmXl232AqFEgRhuKwa3LsTDwIaPPaXxcbmsV/L 9oJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710360233; x=1710965033; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=SwOa0d5iEsj22k6rrMTfooiQpD1S2K1eu8qbBMYvQJw=; b=nOChmQjoiZIZcfKyraERNhaaWMvskA2CbxkjUkF39iZq4D6qN3o6Gl5TLHa3F1B/CJ 6nPx2ut+sHWMpcZ7mbLSTPBfI53O/qv8/hXZYkYbrV4nfN2DfZ2EzdyS0VHK+h23CppA wp1M1d1kLKRVeIDZ25NRcJaxrLu9WAT+AYjAkRi0ww5gungD8lXI82hYZt2BCXsPgVXF 5D/FqXHQiuAH/mTm1M3E6i7gEB2D+5DVwhBKnZpViDGd+GJ3y1bRucaYePlBNdIDEtBC aI4TDAgnKm5DkfiCkRsJxmpxrEt5wuetqFOLRzIEbv2wgmQC6wHl5asGK4BQ1VqMVjHJ iAiQ== X-Forwarded-Encrypted: i=1; AJvYcCXvtMpBRAQPqjLX3olllcncVyxi0fNkFQZoXNhJfD8kAoXbNr2TfTPEO1/SrV/WZQ0gOoXgOcS0PpZ1x1Qo7TBF7Q+M3L4= X-Gm-Message-State: AOJu0YxIRnW+8wdekKrHnZ074Ysd8Z/s0LIlKKSwIqA9F5vALtEfGWfJ OcOqae7CJhB6R6J2avLodkZSFasduA6KOLyqM2HfEIt8kbA3+q6U X-Google-Smtp-Source: AGHT+IHxYnatmN8tJvhU4ZVCCeuqTKam0m0Jn1el6T4zx4c6Vw8WU+pP0Bad8ulIUVVBSs/uliuSmA== X-Received: by 2002:a05:6214:5844:b0:690:4947:c2d6 with SMTP id ml4-20020a056214584400b006904947c2d6mr1139758qvb.47.1710360233476; Wed, 13 Mar 2024 13:03:53 -0700 (PDT) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id e3-20020ad44183000000b00690df461ecbsm2476914qvp.10.2024.03.13.13.03.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 13:03:53 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Tom Tromey Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <877cj6izv7.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Wed, 14 Feb 2024 20:56:28 +0100") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> Date: Wed, 13 Mar 2024 21:03:51 +0100 Message-ID: <87sf0tsxug.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello folks, K=C3=A9vin Le Gouguec writes: > And here's another revision, addressing most of the points below. > WDY'allT? > [=E2=80=A6] >> * maybe "none (tracking local branch)" is not informative and we should >> ditch it, >> * maybe we should fall back to "origin", like vc-git-repository-url >> does, > > FWIW, the current patch will show > > Branch : vc-dir-tracking-branch > Tracking : origin/master > Remote : https://git.savannah.gnu.org/git/emacs.git > > for my checkout of this work-in-progress patch, and > > Branch : vc-dir-bug > Tracking : master > Remote : none (tracking local branch) > > for a checkout made following Tom's recipe, and > > Branch : trunk > > for a fresh 'git init' with just a default branch. Wondering if there's anything I can do to help with review, or if I should install this. OT1H I don't want to be pushy, OTOH I should be in the area to answer for any collateral damage. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 14 22:57:59 2024 Received: (at 68183) by debbugs.gnu.org; 15 Mar 2024 02:57:59 +0000 Received: from localhost ([127.0.0.1]:51046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkxlf-0005y7-5S for submit@debbugs.gnu.org; Thu, 14 Mar 2024 22:57:59 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:36799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkxlb-0005xs-AF for 68183@debbugs.gnu.org; Thu, 14 Mar 2024 22:57:57 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id CDEDF32004CE; Thu, 14 Mar 2024 22:57:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 14 Mar 2024 22:57:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1710471432; x=1710557832; bh=wTiE72uWqV1F2cfQghzfqC6jismWqvwHwG9/H8k72NQ=; b= b5GDXHWEa+d4h993ppFhOk/kywWfYDL4A9iYRj+XalSNFAV5dOnQSH1KDOIGd1pX XiiNQMsYNaC3PeeuuVUC4Q71ynp+KmKQ+wczuo/XmrfsFg2q/hoC6iBLFxrkQ8dC cNxYzj3lgzztsuYhUV2DgOZbjBP4mW8ZGZ0e01XTq1voB7gsYHu1RAKKyMcS83Di 14UkYfEQrDIvJzCQD/4Yiaead53br7BseLhkw4E2ZlntzXG3DwsYmUSVmZW6vmPR 6LeuDNr+DKgZO0BX8cOxQqLHgQgIVVpzntVMlDPxDekmawG6F4FJXAjIwhZGbvDo r2bt8TQUwCpkiqB1HEW+KA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710471432; x= 1710557832; bh=wTiE72uWqV1F2cfQghzfqC6jismWqvwHwG9/H8k72NQ=; b=o CDrQkDia5s1IgJCUqSjrVYLyzdqXaY7XdkHYFszCUQjd/sHivgmfWF24QeG+O2Lm jWh3vkJYP4FfhFQez/28mtkVm3J70O19La9WjnCV8+PtITBmn+pq/WcQGmPz+ycW 4v+85qFZQSuwz05YRjVyJkzosRShZZZFXe2AXRdD5frKsdX4QL/7fYQn04QS3140 OTcF2Cl8flzW80bTEXwqUtGirXp4ZNDl2LNQQSJwPub2bp2LO+Zl9WFsgnA+q/Y+ r/nS1hfRzGZVHHTvcp9jW0ydCrdf37ZYvf8jLBsUPo24hp0iN8i2kedEpZ4IXBbm OeQ2zBvNkdYVF7LYFXmzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeekgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeuteduhfeitdejkeeuffefhefgffevveetjedthfetteegtefhveeujeekjefg veenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Mar 2024 22:57:10 -0400 (EDT) Message-ID: Date: Fri, 15 Mar 2024 04:57:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out Content-Language: en-US To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= , Tom Tromey References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> From: Dmitry Gutov In-Reply-To: <877cj6izv7.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi! Sorry about the late reply. It seems like you've done a fair amount of testing, both manual and automated - thanks, more tests are welcome. On 14/02/2024 21:56, Kévin Le Gouguec wrote: > And here's another revision, addressing most of the points below. > WDY'allT? > >> * the test should probably have a (skip-unless (have-git-or-something)), > Done. > >> * maybe "none (tracking local branch)" is not informative and we should >> ditch it, >> * maybe we should fall back to "origin", like vc-git-repository-url >> does, > FWIW, the current patch will show > > Branch : vc-dir-tracking-branch > Tracking : origin/master > Remote :https://git.savannah.gnu.org/git/emacs.git > > for my checkout of this work-in-progress patch, and > > Branch : vc-dir-bug > Tracking : master > Remote : none (tracking local branch) > > for a checkout made following Tom's recipe, and > > Branch : trunk > > for a fresh 'git init' with just a default branch. IIUC you're adding the new "Tracking" header to the output? That seems like it should be helpful. Is there a way that we could/should optimize the display? I.e., I guess the most common case will be something like: Branch : foo-bar Tracking : origin/foo-bar which is not bad, but might be less useful than indicating that the current branch does not track anything (and so the next 'git push' should come with '-u'), or tracks a differently named branch. It might be more ergonomic to emphasize "irregular" scenarios and maybe even save on the extra line in the "common" one. Just a thought. Not something that needs to be addressed right now. And I might as well be off the mark here. > OT1H "none (tracking local branch)" is redundant with "Tracking" not > being prefixed with "origin"; OTOH > > * stripping "Remote" altogether might confuse users - at least "tracking > local branch" hints at what's going on, > > * Falling back to origin's URL might also cause confusion: users might > then expect 'vc-pull' to fetch changes from that URL, which is not the > case. That seems fine. > So all in all I think the above is reasonably useful. > >> * rushed the ChangeLog entry; vc-git-test--run should also be declared >> as a "new helper" (and maybe I should spell out that I used it to not >> have to depend on vc-git-- internal functions), > Done. > >> * maybe the new header deserves a NEWS entry. > Maybe? It wouldn't hurt. Up to you. Anyway, I think the patch is good to go. Please feel free to install it; whatever cosmetic changes we might like to add could be done later. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 16 13:58:20 2024 Received: (at 68183) by debbugs.gnu.org; 16 Mar 2024 17:58:20 +0000 Received: from localhost ([127.0.0.1]:56445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlYIW-0008RM-5W for submit@debbugs.gnu.org; Sat, 16 Mar 2024 13:58:20 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:56669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlYIT-0008R7-RD for 68183@debbugs.gnu.org; Sat, 16 Mar 2024 13:58:18 -0400 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-33ec7e1d542so1578726f8f.1 for <68183@debbugs.gnu.org>; Sat, 16 Mar 2024 10:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710611795; x=1711216595; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J2j1GzZbHI2JtR7/mFPnWBftfjcTQAgbue5sjCanWHg=; b=Z5ACLjETr1067CSe5662+FxncC8AjkCPaS+T7DF0LBJ2OvMr+kPg6HNWvhtdhHbZj8 +3rNagDTpL5+0amQ+ZRunGUYw1C6LmC6lrUwawUBV3fqtUxJ4h029qZT0YaEiM2SCs9O oZUkGtaDMuy5l7DMBqFym7liqP5LxHZhCnSgyloXh2QgbeuMqLYHTejyAJPqY2ykXwTC o1scKO+j5saZyb6CvTpeKToZfoXcQTEr80J//tc0D5AHDN01HRoUAsyeT7rU4UR1prx/ q2DP5uYh/BnXT8xCbwU9tl29KawjAiIfBJq46cApo3DIWfUEIJj4iQW0MoYDSNsqrxXm Q8jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710611795; x=1711216595; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=J2j1GzZbHI2JtR7/mFPnWBftfjcTQAgbue5sjCanWHg=; b=b0Yp61fhWTiahROLmWixUZnG+bH0nQVIPA0QMFi0wcCftJK5Yroyk9dIDu2ZRSYDbN XKXWQ7y+4D9KR15K5FUxHMizQEY0CZ8VT3H2VxqcqbUwG+FaLYrjVL/71Ug6+mYDwPA/ mnpaZK1r27e5JS7sXqtyFpJnUkjNpivbywmB6aWHP/StqAfSD0h/FSZmRDUhyFRTeXOF /eL5BKfpyt+fA+Yqt/s0xaw6McuWgwSRixV9WrgEMXMeey8k573Wh8Rg26TVKMgNYa4P eXSEAcUPVp/0gMKW7eqjQ7bZt0VLKgeiVR5A70bkXIPXFFPfj3pT95m562XV8lXjop/O aY4g== X-Forwarded-Encrypted: i=1; AJvYcCX7AtUaYFzLJdkkL764fYM3xSZhUOCyTax5gxzVnRNRZ5eemp/q2pfOjhzMWt+indBbYU5wTdvt1ZP+7bxTw9ogu+2lwG8= X-Gm-Message-State: AOJu0YxuPNt3XTaji1C5JdUgZGESSExkHUTS7UpFzjSRVUDmkyF8nqLh Op+VTGGMalsa6qmu0ALP4s+ki1TRETkeFQLlA0ikiAHRL8D4jUA/ X-Google-Smtp-Source: AGHT+IHHLobOhi17pbNCd9LuRak81pZyX1wLO7kSxJEbI8p5aLLE7PKuMUUtnRsjcikLNCRtxVazsQ== X-Received: by 2002:a5d:644a:0:b0:33e:d232:b3e6 with SMTP id d10-20020a5d644a000000b0033ed232b3e6mr3672614wrw.10.1710611794623; Sat, 16 Mar 2024 10:56:34 -0700 (PDT) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id bp2-20020a5d5a82000000b0033e43756d11sm2961112wrb.85.2024.03.16.10.56.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 10:56:34 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Dmitry Gutov Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: (Dmitry Gutov's message of "Fri, 15 Mar 2024 04:57:08 +0200") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> Date: Sat, 16 Mar 2024 18:56:32 +0100 Message-ID: <87zfuyrrfz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , Tom Tromey , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > Sorry about the late reply. (Not at all, thanks for taking a look =F0=9F=99=8F) >> FWIW, the current patch will show >> Branch : vc-dir-tracking-branch >> Tracking : origin/master >> Remote :https://git.savannah.gnu.org/git/emacs.git >> for my checkout of this work-in-progress patch, and >> Branch : vc-dir-bug >> Tracking : master >> Remote : none (tracking local branch) >> for a checkout made following Tom's recipe, and >> Branch : trunk >> for a fresh 'git init' with just a default branch. > > IIUC you're adding the new "Tracking" header to the output? That seems li= ke it should be helpful. > > Is there a way that we could/should optimize the display? I.e., I guess t= he most common case will be something like: > > Branch : foo-bar > Tracking : origin/foo-bar Right, the current patch indeed shows this for a common-case clone of the Emacs repo: VC backend : Git Working dir: ~/src/emacs/master/ Branch : master Tracking : origin/master Remote : https://git.savannah.gnu.org/git/emacs.git > which is not bad, but might be less useful than indicating that the curre= nt branch does not track anything (and so the next 'git push' should come w= ith '-u'), or tracks a differently named branch. It might be more ergonomic= to emphasize "irregular" scenarios and maybe even save on the extra line i= n the "common" one. Good food for thought. Re. optimizing the display (which I interpret as reducing redundant information): as someone who often works with multiple remotes, seeing "Branch: FOO ; Tracking: origin/FOO" is actually useful, so I wouldn't want to remove the "tracking" bit unconditionally. OTOH it could surely be condensed to a single line, say Branch : master (tracking: origin/master) Likewise, in the local-tracking-branch case, we could go from Branch: : vc-dir-bug Tracking : master Remote : none (tracking local branch) to just Branch: : vc-dir-bug (tracking: local master) Re. emphasizing irregular scenarios, specifically those where 'git push' will require '-u': I like the idea, but I am wary of us getting lost in the weeds second-guessing Git's intentions. E.g. even when branch.foo.merge and branch.foo.remote are unset, 'git push' can still be called without '-u' if push.default is 'current' and remote.pushDefault is set (whereas 'git pull' will fail). > Just a thought. Not something that needs to be addressed right now. And I= might as well be off the mark here. I agree it's worth thinking about. The Right Solution=E2=84=A2 would proba= bly come with user options to let users fine-tune which details they care about? It would be interesting to survey Git UIs to see how they approach this (FWIW I am partial to Magit's presentation, but I have not studied how it handles all the corner cases we considered). >>> * maybe the new header deserves a NEWS entry. >> Maybe? > > It wouldn't hurt. Up to you. > > Anyway, I think the patch is good to go. Please feel free to install it; = whatever cosmetic changes we might like to add could be done later. ACK. I might go a head and install then (after polishing the changelog, i.e. re-filling and scrubbing Unicode ellipses) in the spirit of getting the original issue fixed; perhaps worth holding off on the NEWS entry until we decide how exactly things should look. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 16 21:07:28 2024 Received: (at 68183) by debbugs.gnu.org; 17 Mar 2024 01:07:28 +0000 Received: from localhost ([127.0.0.1]:57381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlezo-0005ik-0Z for submit@debbugs.gnu.org; Sat, 16 Mar 2024 21:07:28 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:48109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlezl-0005iY-7J for 68183@debbugs.gnu.org; Sat, 16 Mar 2024 21:07:26 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id B97873200392; Sat, 16 Mar 2024 21:06:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 16 Mar 2024 21:06:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1710637601; x=1710724001; bh=p5Isox5NbuavHls5zAbb988LxWyjSkdUNRFcFhOaEfM=; b= EH+yp16i2G9cMkLlDNjSVT442Emi11uy8pYuC0pOg6mWBLYx/gH5aT2pgF+HlENl ms0X5bqhxs9u9WiSIQ0eZ4mzSDLxFa+B62gl2nQm3nct8869pj0Mx1m3e1pqINDm BpgZIo1mlgV6Imh+c2EDLBYIRnS/po9BZ28cU+56QzCKhauQ/n0xCKQvNHgBka3z w3vjHwXpWiLuCmEoC9vvUfwVHgDQjTcMNkbtkonC5UmP/UBGRDciDusQdQUdKwaN 2MwoRi+aJ7P/cd+AkK3LfdAQ6IA4mK9jqyUbRIGPQYURWRX2rxoc4s0VT0K9CfJ+ 9xeHkCF2BQLnE4SZ4JyYhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710637601; x= 1710724001; bh=p5Isox5NbuavHls5zAbb988LxWyjSkdUNRFcFhOaEfM=; b=T j0WVkLR6/z0+dEEuUzEkw3HzXIsU7028n7pm/tocUFEbTQ9k6mE66NYJ5idKa6Rf NT/AruU5aKHSGKQh6sO2tkhpjOUaoEGIzf2iz2PTXxVxlHcocs0hVAQdUV2fHuXD uFlDjm9GDpaUw/YrbFAyuyL0o4qd3ZKpwUoXAFCTfucSe2g2e3aX9Vulif1Q76pu O6X0Emynl7olIR8t3kuqbKWqAHRUCQgsQ7L558Vhd1dc3OmRn2x8q4k8dCraYmVv IwhS/WB4/PeRp1bQHTRqTK/2kSHG0lR14tewBbOQDIFCE2cXEcK+3IxiDPI0yc1S ZfaZBVNwPA5AirpLzCixQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeefgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeuteduhfeitdejkeeuffefhefgffevveetjedthfetteegtefhveeujeekjefg veenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Mar 2024 21:06:38 -0400 (EDT) Message-ID: <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> Date: Sun, 17 Mar 2024 03:06:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out Content-Language: en-US To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> From: Dmitry Gutov In-Reply-To: <87zfuyrrfz.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , Tom Tromey , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 16/03/2024 19:56, Kévin Le Gouguec wrote: >> IIUC you're adding the new "Tracking" header to the output? That seems like it should be helpful. >> >> Is there a way that we could/should optimize the display? I.e., I guess the most common case will be something like: >> >> Branch : foo-bar >> Tracking : origin/foo-bar > > Right, the current patch indeed shows this for a common-case clone of > the Emacs repo: > > VC backend : Git > Working dir: ~/src/emacs/master/ > Branch : master > Tracking : origin/master > Remote : https://git.savannah.gnu.org/git/emacs.git > >> which is not bad, but might be less useful than indicating that the current branch does not track anything (and so the next 'git push' should come with '-u'), or tracks a differently named branch. It might be more ergonomic to emphasize "irregular" scenarios and maybe even save on the extra line in the "common" one. > > Good food for thought. > > Re. optimizing the display (which I interpret as reducing redundant > information): as someone who often works with multiple remotes, seeing > "Branch: FOO ; Tracking: origin/FOO" is actually useful, so I wouldn't > want to remove the "tracking" bit unconditionally. OTOH it could surely > be condensed to a single line, say > > Branch : master (tracking: origin/master) Yeah, something like this could work. I was imagining pseudo-graphical Branch : master -> origin/master , but it's good to have words. Maybe drop the last colon... > Likewise, in the local-tracking-branch case, we could go from > > Branch: : vc-dir-bug > Tracking : master > Remote : none (tracking local branch) > > to just > > Branch: : vc-dir-bug (tracking: local master) I would say that the local-tracking scenario is a minority, and so it's not as important to optimize, but the above makes sense. But the word "local" is very close to "master", while the latter is a special string which should probably somehow stand out. So the "unoptimized" version might still have its advantages: Branch: : vc-dir-bug (tracking master) Remote : none (local branch) or Branch: : vc-dir-bug (-> master) Remote : none (local branch) or Branch: : vc-dir-bug (tracking -> master) Remote : none (local branch) > Re. emphasizing irregular scenarios, specifically those where 'git push' > will require '-u': I like the idea, but I am wary of us getting lost in > the weeds second-guessing Git's intentions. E.g. even when > branch.foo.merge and branch.foo.remote are unset, 'git push' can still > be called without '-u' if push.default is 'current' and > remote.pushDefault is set (whereas 'git pull' will fail). Okay, if you're sure. A (no upstream) note might make sense in the above scenario too, but I don't have a strong opinion. We could also make a user option later, if the new behavior makes sense for most usage habits but not all. >> Just a thought. Not something that needs to be addressed right now. And I might as well be off the mark here. > > I agree it's worth thinking about. The Right Solution™ would probably > come with user options to let users fine-tune which details they care > about? It would be interesting to survey Git UIs to see how they > approach this (FWIW I am partial to Magit's presentation, but I have not > studied how it handles all the corner cases we considered). Magit, meaning just one line for Head: and another for Merge:? >>>> * maybe the new header deserves a NEWS entry. >>> Maybe? >> >> It wouldn't hurt. Up to you. >> >> Anyway, I think the patch is good to go. Please feel free to install it; whatever cosmetic changes we might like to add could be done later. > > ACK. I might go a head and install then (after polishing the changelog, > i.e. re-filling and scrubbing Unicode ellipses) in the spirit of getting > the original issue fixed; perhaps worth holding off on the NEWS entry > until we decide how exactly things should look. I'm okay with that. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 14:11:31 2024 Received: (at 68183) by debbugs.gnu.org; 17 Mar 2024 18:11:32 +0000 Received: from localhost ([127.0.0.1]:33470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rluyp-00007P-FH for submit@debbugs.gnu.org; Sun, 17 Mar 2024 14:11:31 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:57691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rluym-00006z-JM for 68183@debbugs.gnu.org; Sun, 17 Mar 2024 14:11:29 -0400 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-34175878e30so66771f8f.3 for <68183@debbugs.gnu.org>; Sun, 17 Mar 2024 11:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710698985; x=1711303785; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tgHllJjDGdTcfu9cn5ROhjsUKnkbr0gYKtImvH4YlsQ=; b=WqszNuDh3i0lp3EVyrwzyJtSXRxFUHteX46VcOClgR69Ro+YatsRlPiAVQsyXoROaQ jb8CerJiLrC2DB3lyOK1CXOqsTSwFgiX8AyURltwkBsY0ST05GfTLryrXenDLtzyAdPw s7+AmdrAy82pHbpUdQLHRdni3w6K+zMAQi2IUnjZRgXy1usWU3gVjQz2o10UoOdLsXTI 1VVJf1QUm59zadj8wQB9YKfPtOLGutTNELQ/zvTa+XY/JA4Enp60L0dVe/TpjnMtuQTD ndUCbqilKdhDajbxIZCX5th6GfaIeGrKtCO3MaaIgxwmAt7frY9Jm/KeelnUWyJHW8ql abCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710698985; x=1711303785; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tgHllJjDGdTcfu9cn5ROhjsUKnkbr0gYKtImvH4YlsQ=; b=Rk9AdYCtq5nnApdHhxxpCyFMQX2/vJnf+N4GPabSfS0uLgLVXlYGKDwWyEV4l4VIE9 GZzAAFuUikqQRNA9KYouNM9wsSjEQJQp29luBjG0iSy3lKur7vVCPHSUa8qhqJqVJ3Mm 2Xjd7dlooKZ9BJ50DcvdZ7sZhLr/KjGvgmT0twH3CuiG+rv+qf9YE+Ie4chJAmPZU9al KI9JjZZQFGaoL6OcvVUU3rcELmqX6m5TbcTu/26qrwqn05Z+JugudvEjep93pYwJvXDX 9nXkCoaVPQLAxBjD8nwPNWUUvICUFJ2D307NFyEG2p9tfRvSLQBgUlhDBfhdWytK4cSk CMxQ== X-Forwarded-Encrypted: i=1; AJvYcCVbf+VSUo9dgzhRbDJiymYjSeD5dT7lFlfyqF7Pk3mMSvwJzMgBGvFPBmYhkInNVn38xeGCpYwdITVa5pQYqSID8GCVPHs= X-Gm-Message-State: AOJu0Yx5XFOHETx3fLAIVz2TZSDSgI1OneghQ25uoEiXWXlxKlEmxPsz 08mY4W+OCKBbOi2ZZ9c1EVlrnBacIpyrEa8PeodfF+PnMegvaxKw X-Google-Smtp-Source: AGHT+IHEdFHBgnwUbtiLCUigOiApjBxvKZJykBfdmD61b2iiguwljiE2xjNrjwvk40C+EmOaALTE/A== X-Received: by 2002:a05:6000:14c:b0:33e:1e2b:3f76 with SMTP id r12-20020a056000014c00b0033e1e2b3f76mr7281329wrx.61.1710698984670; Sun, 17 Mar 2024 11:09:44 -0700 (PDT) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id f10-20020adffcca000000b0033d640c8942sm7991251wrs.10.2024.03.17.11.09.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 11:09:43 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Dmitry Gutov Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> (Dmitry Gutov's message of "Sun, 17 Mar 2024 03:06:36 +0200") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> Date: Sun, 17 Mar 2024 19:09:42 +0100 Message-ID: <87ttl43f2x.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , Tom Tromey , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: >> Re. optimizing the display (which I interpret as reducing redundant >> information): as someone who often works with multiple remotes, seeing >> "Branch: FOO ; Tracking: origin/FOO" is actually useful, so I wouldn't >> want to remove the "tracking" bit unconditionally. OTOH it could surely >> be condensed to a single line, say >> Branch : master (tracking: origin/master) > > Yeah, something like this could work. I was imagining pseudo-graphical > > Branch : master -> origin/master > > , but it's good to have words. Maybe drop the last colon... Right, feels like we have some horizontal space to work with, so we can spend the extra word if it conveys more meaning than an arrow (and yeah, OTOH that last colon does not bring much). >> Likewise, in the local-tracking-branch case, we could go from >> Branch: : vc-dir-bug >> Tracking : master >> Remote : none (tracking local branch) >> to just >> Branch: : vc-dir-bug (tracking: local master) > > I would say that the local-tracking scenario is a minority, and so it's n= ot as important to optimize, but the above makes sense. But the word "local= " is very close to "master", while the latter is a special string which sho= uld probably somehow stand out. So the "unoptimized" version might still ha= ve its advantages: > > Branch: : vc-dir-bug (tracking master) > Remote : none (local branch) That looks sensible. If I were to argue in favor of keeping "local" juxtaposed to the tracking branch, I'd say that in the _absence_ of an explicit qualifier in "Branch: vc-dir-bug (tracking master)", my brain might "default" to assuming we are tracking the remote "master"; a solution to let branch names stand out might then be faces: e.g. vc-git-log-view-mode paints them with change-log-list=E2=80=A6 But I don't know if it's a very powerful argument. >>> Just a thought. Not something that needs to be addressed right now. And= I might as well be off the mark here. >> I agree it's worth thinking about. The Right Solution=E2=84=A2 would pr= obably >> come with user options to let users fine-tune which details they care >> about? It would be interesting to survey Git UIs to see how they >> approach this (FWIW I am partial to Magit's presentation, but I have not >> studied how it handles all the corner cases we considered). > > Magit, meaning just one line for Head: and another for Merge:? So, given =F0=9D=92=B7 =E2=89=94 current branch =F0=9D=93=82 =E2=89=94 branch.=F0=9D=92=B7.merge =F0=9D=93=87 =E2=89=94 branch.=F0=9D=92=B7.remote =F0=9D=93=85 =E2=89=94 branch.=F0=9D=92=B7.pushRemote or remote.pushDefau= lt By default, magit-status shows: "Head:" =F0=9D=92=B7, or the current commit when detached "Merge:" (or "Rebase:") =F0=9D=93=87/=F0=9D=93=82, or just =F0=9D=93=82 if = =F0=9D=93=87 =3D "." "Push:" =F0=9D=93=85/=F0=9D=92=B7, appending "does not exis= t" if applicable (And another header related to tags I'm going to ignore for now) Of note, Magit offers an option (magit-status-headers-hook) to let users control which of these (and more) to display. One of the available headers that is disabled by default shows "Remote: =E2=84=9B " where =E2=84=9B is =F0=9D=93=87, or "origin" if this branch's remote is uns= et or ".", or "the first remote in alphabetic order" if "origin" does not exist. ( Also of note, IMO, is the branch-variable-configuration menu (the magit-branch-configure transient), which looks like this: Configure vc-dir-bug d branch.vc-dir-bug.description unset u branch.vc-dir-bug.merge refs/heads/master branch.vc-dir-bug.remote . r branch.vc-dir-bug.rebase [true|false|default:false] p branch.vc-dir-bug.pushRemote [hirondell|origin|savannah-rw|vps|rem= ote.pushDefault:vps] Configure repository defaults R pull.rebase [true|false|default:false] P remote.pushDefault [hirondell|origin|savannah-rw|vps] b Update default branch Configure branch creation a m branch.autoSetupMerge [always|true|false|default:true] a r branch.autoSetupRebase [always|local|remote|never|default:never] __ (Not pictured: the currently active value in [foo|bar|baz] is highlighted with a face; the keybindings on the left cycle between alternatives) No idea how/where that would fit into VC, but golly is it a neat UI to work with, so I thought it deserved a shout-out. ) >>>>> * maybe the new header deserves a NEWS entry. >>>> Maybe? >>> >>> It wouldn't hurt. Up to you. >>> >>> Anyway, I think the patch is good to go. Please feel free to install it= ; whatever cosmetic changes we might like to add could be done later. >> ACK. I might go a head and install then (after polishing the changelog, >> i.e. re-filling and scrubbing Unicode ellipses) in the spirit of getting >> the original issue fixed; perhaps worth holding off on the NEWS entry >> until we decide how exactly things should look. > > I'm okay with that. (Pushed =F0=9F=93=A8) From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 18 11:33:00 2024 Received: (at 68183) by debbugs.gnu.org; 18 Mar 2024 15:33:00 +0000 Received: from localhost ([127.0.0.1]:58764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmEyv-0001kE-0v for submit@debbugs.gnu.org; Mon, 18 Mar 2024 11:33:00 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:51235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmEyr-0001jd-Bo for 68183@debbugs.gnu.org; Mon, 18 Mar 2024 11:32:56 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id D892032009F9; Mon, 18 Mar 2024 11:26:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 18 Mar 2024 11:26:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1710775577; x=1710861977; bh=IYmDaIijhLispHm+ouMrC6ZBDPUuO/FdUTBlDDe3Pu0=; b= hD3qox1cafQdXhzjazx9bNjOjrLQ6huvAslLnswlRnf5Hv6HtP1a5BTaDiC6bHSp XfbG5I9DnCM1JaRqRXg9vuMiBa+B7EOdIr23qz8HYCSyUWOwjcDjfU5fNQYSXXWq 7d5/cvMpo1WayxSEYe89gVMvIwZldMPnq5JTz0Ds2F03NYMS+IK8AIAicAhSSchz SVxn9OUA586ZrEAnUvZZvyo6aZopUnHMyP74dXbiDv11+scuygkP6dRFTGw5ozFk NWsidOzDxmTOlcReSsbhBmtqECARQ4oJw6d4jPska5ixQjEsDcy1PULJAm1F6W5S VMUDTLu81JrrO1P0AtqwRw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1710775577; x= 1710861977; bh=IYmDaIijhLispHm+ouMrC6ZBDPUuO/FdUTBlDDe3Pu0=; b=a bu5YvyOtrl3VQxI8IsP+2tveav5a6V9oP60kVOTHcmnuel2WvIaEX43rBt8a3MAt onpjL29S+hcOwXEAyO7qBrdIbTWaERaBq57lGzGKxxvI7+Dx7FnuDozB0Pdc8Bbs SBVNxC1ZGmlov3m+eanFF2FnsfnCamy1mN/iI9cD3hcIm1IAm6L0VaTDeQE8IyTT 9tddynZGr/7oNCHdgR+sWnQ+cbhNmYHjBLnbn0ijVweaFr+mYYoJqLtJnZup2eAw INdoirEWpUhcAd5kdAvCKdrJvEg4ZDzKZTuqSWX/Sj/5ExJAeBET7DIQ6sNITX/x 2YejwVLD4CE3mM5CbyH2g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeejgdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeegleefteekgffhvdfhtdegveevveetteegteevgeettdehhfdukeetheffueek keenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Mar 2024 11:26:14 -0400 (EDT) Message-ID: <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> Date: Mon, 18 Mar 2024 17:26:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out Content-Language: en-US To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> From: Dmitry Gutov In-Reply-To: <87ttl43f2x.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , Tom Tromey , 68183@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 17/03/2024 20:09, Kévin Le Gouguec wrote: >> I would say that the local-tracking scenario is a minority, and so it's not as important to optimize, but the above makes sense. But the word "local" is very close to "master", while the latter is a special string which should probably somehow stand out. So the "unoptimized" version might still have its advantages: >> >> Branch: : vc-dir-bug (tracking master) >> Remote : none (local branch) > > That looks sensible. If I were to argue in favor of keeping "local" > juxtaposed to the tracking branch, I'd say that in the _absence_ of an > explicit qualifier in "Branch: vc-dir-bug (tracking master)", my brain > might "default" to assuming we are tracking the remote "master"; a > solution to let branch names stand out might then be faces: > e.g. vc-git-log-view-mode paints them with change-log-list… > > But I don't know if it's a very powerful argument. I figured that when "local" is on the next line already, it's easy enough to notice. Anyway, it's up to you, I think. >>>> Just a thought. Not something that needs to be addressed right now. And I might as well be off the mark here. >>> I agree it's worth thinking about. The Right Solution™ would probably >>> come with user options to let users fine-tune which details they care >>> about? It would be interesting to survey Git UIs to see how they >>> approach this (FWIW I am partial to Magit's presentation, but I have not >>> studied how it handles all the corner cases we considered). >> >> Magit, meaning just one line for Head: and another for Merge:? > > So, given > > 𝒷 ≔ current branch > 𝓂 ≔ branch.𝒷.merge > 𝓇 ≔ branch.𝒷.remote > 𝓅 ≔ branch.𝒷.pushRemote or remote.pushDefault > > By default, magit-status shows: > > "Head:" 𝒷, or the current commit when detached > "Merge:" (or "Rebase:") 𝓇/𝓂, or just 𝓂 if 𝓇 = "." > "Push:" 𝓅/𝒷, appending "does not exist" if applicable So Magit also prints just "master" is it's a local tracking branch and something like "origin/master" when it belongs to a remote? Going with that approach, we'd seem justified to print Branch: : vc-dir-bug (tracking master) in the former case and Branch: : vc-dir-bug (tracking origin/master) in the latter. > (And another header related to tags I'm going to ignore for now) > > Of note, Magit offers an option (magit-status-headers-hook) to let users > control which of these (and more) to display. > > One of the available headers that is disabled by default shows > > "Remote: ℛ " > > where ℛ is 𝓇, or "origin" if this branch's remote is unset or ".", or > "the first remote in alphabetic order" if "origin" does not exist. Meaning it prepends the remote's url with remote's name, if that line is configured to be shown. We could do that too. > ( > Also of note, IMO, is the branch-variable-configuration menu (the > magit-branch-configure transient), which looks like this: > > Configure vc-dir-bug > d branch.vc-dir-bug.description unset > u branch.vc-dir-bug.merge refs/heads/master > branch.vc-dir-bug.remote . > r branch.vc-dir-bug.rebase [true|false|default:false] > p branch.vc-dir-bug.pushRemote [hirondell|origin|savannah-rw|vps|remote.pushDefault:vps] > > Configure repository defaults > R pull.rebase [true|false|default:false] > P remote.pushDefault [hirondell|origin|savannah-rw|vps] > b Update default branch > > Configure branch creation > a m branch.autoSetupMerge [always|true|false|default:true] > a r branch.autoSetupRebase [always|local|remote|never|default:never] > __ > (Not pictured: the currently active value in [foo|bar|baz] is > highlighted with a face; the keybindings on the left cycle between > alternatives) > > No idea how/where that would fit into VC, but golly is it a neat UI to > work with, so I thought it deserved a shout-out. > ) Magit is definitely a great UI to learn Git's capabilities. >>>>>> * maybe the new header deserves a NEWS entry. >>>>> Maybe? >>>> >>>> It wouldn't hurt. Up to you. >>>> >>>> Anyway, I think the patch is good to go. Please feel free to install it; whatever cosmetic changes we might like to add could be done later. >>> ACK. I might go a head and install then (after polishing the changelog, >>> i.e. re-filling and scrubbing Unicode ellipses) in the spirit of getting >>> the original issue fixed; perhaps worth holding off on the NEWS entry >>> until we decide how exactly things should look. >> >> I'm okay with that. > > (Pushed 📨) Thanks! From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 10:27:12 2024 Received: (at 68183) by debbugs.gnu.org; 7 Aug 2024 14:27:12 +0000 Received: from localhost ([127.0.0.1]:34860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbhd8-0008QE-51 for submit@debbugs.gnu.org; Wed, 07 Aug 2024 10:27:12 -0400 Received: from mail-lj1-f178.google.com ([209.85.208.178]:56356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbhd4-0008Pc-6F for 68183@debbugs.gnu.org; Wed, 07 Aug 2024 10:27:08 -0400 Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2f15790b472so24318201fa.0 for <68183@debbugs.gnu.org>; Wed, 07 Aug 2024 07:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723040734; x=1723645534; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NGPO7+Uw7MIN2ACrWnWcwPCKzOCnz+ONpqfg7CjxEZ8=; b=EFx24i6pzRWovnrCU3aZcp2Dmlz7w2bk/UkMnSdMchdfQaC2i2AGana4dEUc2rHKoK aI84TEVRaR090ldZsKbVXEPPhItcEUpCndU39L59xYxoYVb2BivpyMUOoYwF7fC4ONU4 RPSDaVMGncWzqqL0oF0/zuD1MtwGfI8tyiQ0YaqjIfsufKOwjCN7MBw7yzKAvjDvPiL4 H+vbiTQSdWKY8tugWiTq+h077VZIPREKp6SlvrCXFcV+t3pPy5h5B0W6YSFVUoBsqvUO HvJxnNxVWWaDyyWurtAh9elsDsHsLNZOrLJEmUfeEGS43x1vrZpiomjPVaBr/Ke4781F zj5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723040734; x=1723645534; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NGPO7+Uw7MIN2ACrWnWcwPCKzOCnz+ONpqfg7CjxEZ8=; b=srrYHpoe1fahBVRYv4WOTTfFbksEIVbLcVsWHTLBbQvu6Z0N1rvlsyPpQinHZ/w1HI 8pAzog4n7PCwzS5V5+HhP1IAbGFdIojFIcPQ6czpF4jF7HG7gyxlUA07NrONgYpFYtlv DAjBFhU9me+vU/xo5n8VNdWkIyBJAeHugqL1+xQ7J5EvSWgn7A69rI82xJLCrlCLku+J Vaqh8Hk9PSvB1JsXzpmw03dI207rJZ2kKR4dIltz4BLTm+YSamfuYEhvU6ftvITYbXlH Tq2T09h5MApPGG9PoBLHf5HW1IUXfFgiAVGeq7DD8epgTn6ebY5FAUYDal7UrmBMUgtp H9UA== X-Gm-Message-State: AOJu0YxFXTZMOnjPfs8pxMVTYN42P/w2bR7/vuc57hJEBryZkBpjp3gJ USCiDrbrjgKjbKhCQENLvFdAXWcBjaoNTDdXwWVEzd67NOpIIRFi X-Google-Smtp-Source: AGHT+IH7jWeLUIhWbH6Ivcb9Oh+NMD3UE9MkpNokzX4ggD2GhGhbRYcSY0Mkyas+f08DCn8GFapNAA== X-Received: by 2002:a2e:3c18:0:b0:2ef:2b08:1742 with SMTP id 38308e7fff4ca-2f15ab396eemr115827491fa.48.1723040733687; Wed, 07 Aug 2024 07:25:33 -0700 (PDT) Received: from hirondell ([2001:861:5642:b310:f004:ddf4:26e1:944]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429059a5a8fsm31912485e9.34.2024.08.07.07.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 07:25:32 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: 68183@debbugs.gnu.org Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> (Dmitry Gutov's message of "Mon, 18 Mar 2024 17:26:11 +0200") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> Date: Wed, 07 Aug 2024 16:25:31 +0200 Message-ID: <87h6bwqujo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , Tom Tromey , Sean Whitton , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Heya, Have spent cycles on this on-and-off these past few months; finally have something worth discussing, I think =F0=9F=A4=9E To recap where we stand, AFAIU: the reported vc-dir bug has been fixed (in time for the emacs-30 branch), but the changes could feel intrusive, since a new vc-dir header was added ("Tracking") that some users may not care for. I've now drafted a user option to give users more control over this new header; see patch #3 in the attached series. The first two patches are yak-shaving: patch #1 adds regression tests, patch #2 splits vc-git-dir-extra-headers into more manageable chunks (pure refactoring, no functional change intended). Also attaching a 'squashed.patch' if that helps review. About patch #2, CC'ing Sean Whitton for perspective on vc-git--cmds-in-progress: I was puzzled by the function supporting many commands (rebase, am, merge, bisect), whereas AFAICT its sole user only heeds 'bisect & 'rebase. Wondering if I've missed other in-tree uses, or if we should add headers for 'am and 'merge, "while in there". Curious what y'all think. OT1H not sure an alist is the best UX, OTOH struggled to keep option names concise otherwise. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Test-more-vc-dir-scenarios-with-Git-bug-68183.patch >From 1573015fba16f8b453e87e92e982fc633bca40d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Sun, 7 Jul 2024 12:16:12 +0200 Subject: [PATCH 1/3] Test more vc-dir scenarios with Git (bug#68183) * test/lisp/vc/vc-git-tests.el (vc-git-test-dir-track-local-branch): Remove in favor of new test. (vc-git-test--start-branch): New helper to get a repository going. (vc-git-test--dir-headers): New helper to get a list of headers in the current vc-dir buffer. (vc-git-test-dir-branch-headers): New test, exercising the original bug recipe plus more common scenarios. --- test/lisp/vc/vc-git-tests.el | 98 +++++++++++++++++++++++++++++------- 1 file changed, 80 insertions(+), 18 deletions(-) diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index f15a0f52e8c..2dbf5a8df12 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -26,6 +26,7 @@ (require 'ert-x) (require 'vc) +(require 'vc-dir) (require 'vc-git) (ert-deftest vc-git-test-program-version-general () @@ -108,24 +109,85 @@ vc-git-test--run (apply 'vc-git-command t 0 nil args) (buffer-string))) -(ert-deftest vc-git-test-dir-track-local-branch () - "Test that `vc-dir' works when tracking local branches. Bug#68183." +(defun vc-git-test--start-branch () + "Get a branch started in a freshly initialized repository. + +This returns the name of the current branch, so that tests can remain +agnostic of init.defaultbranch." + (write-region "hello" nil "README") + (vc-git-test--run "add" "README") + (vc-git-test--run "commit" "-mFirst") + (string-trim (vc-git-test--run "branch" "--show-current"))) + +(defun vc-git-test--dir-headers (headers) + "Return an alist of header values for the current `vc-dir' buffer. + +HEADERS should be a list of (NAME ...) strings. This function will +return a list of (NAME . VALUE) pairs, where VALUE is nil if the header +is absent." + ;; FIXME: to reproduce interactive sessions faithfully, we would need + ;; to wait for the dir-status-files process to terminate; have not + ;; found a reliable way to do this. As a workaround, kill pending + ;; processes and revert the `vc-dir' buffer. + (vc-dir-kill-dir-status-process) + (revert-buffer) + (mapcar + (lambda (header) + (let* ((pattern + (rx bol + (literal header) (* space) ": " (group (+ nonl)) + eol)) + (value (and (goto-char (point-min)) + (re-search-forward pattern nil t) + (match-string 1)))) + (cons header value))) + headers)) + +(ert-deftest vc-git-test-dir-branch-headers () + "Check that `vc-dir' shows expected branch-related headers." (skip-unless (executable-find vc-git-program)) - (vc-git-test--with-repo repo - ;; Create an initial commit to get a branch started. - (write-region "hello" nil "README") - (vc-git-test--run "add" "README") - (vc-git-test--run "commit" "-mFirst") - ;; Get current branch name lazily, to remain agnostic of - ;; init.defaultbranch. - (let ((upstream-branch - (string-trim (vc-git-test--run "branch" "--show-current")))) - (vc-git-test--run "checkout" "--track" "-b" "hack" upstream-branch) - (vc-dir default-directory) - (pcase-dolist (`(,header ,value) - `(("Branch" "hack") - ("Tracking" ,upstream-branch))) - (goto-char (point-min)) - (re-search-forward (format "^%s *: %s$" header value)))))) + ;; Create a repository that will serve as the "remote". + (vc-git-test--with-repo origin-repo + (let ((main-branch (vc-git-test--start-branch))) + ;; 'git clone' this repository and test things in this clone. + (ert-with-temp-directory clone-repo + (vc-git-test--run "clone" origin-repo clone-repo) + (vc-dir clone-repo) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . ,main-branch) + ("Tracking" . ,(concat "origin/" main-branch)) + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch: no tracking information. + (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + '(("Branch" . "feature/foo") + ("Tracking" . nil) + ("Remote" . nil)))) + ;; Push with '--set-upstream origin': tracking information + ;; should be updated. + (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/foo") + ("Tracking" . "origin/feature/foo") + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch tracking the _local_ main branch. + ;; Bug#68183. + (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/bar") + ("Tracking" . ,main-branch) + ("Remote" . "none (tracking local branch)")))))))) ;;; vc-git-tests.el ends here -- 2.39.2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Split-vc-git-dir-extra-headers-into-more-manageable-.patch >From f4caa79c492116c3b9c6a6df7972222ee977f13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Sun, 9 Jun 2024 19:41:41 +0200 Subject: [PATCH 2/3] Split vc-git-dir-extra-headers into more manageable chunks The current code requires a lot of eyeballing back-and-forth to: - check where variables are actually used, what impact changing them can have: in actuality, there are three distinct "groups" of headers we compute, each with their own independent state; - understand formatting details such as "who's in charge of the newlines". To solve both issues, split that function into smaller ones, each handling a "group" of headers. The only expected "functional" change is that, by propertizing "\nHeader: " strings, the original code sometimes applied the vc-dir-header face to the newline preceding a header; the new code applies no faces to these newlines. This change would be visible to users with themes adding an :extended background to vc-dir-header. In practice, no in-tree theme is impacted. For bug#68183. * lisp/vc/vc-git.el (vc-git-dir--branch-headers): New function to compute "Branch", "Tracking" and "Remote". (vc-git--cmds-in-progress): Rename to... (vc-git-dir--in-progress-headers): ... this, and compute headers. (vc-git-dir--stash-headers): New function to compute the "Stash" header. (vc-git-dir-extra-headers): Boil down to just setting default-directory and assembling the headers from these new helpers. (vc-git--out-match): New function to call 'git' and capture specific bits of output. --- lisp/vc/vc-git.el | 253 ++++++++++++++++++++++++---------------------- 1 file changed, 131 insertions(+), 122 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index e8257c5dbd0..4d631c7e032 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -717,6 +717,63 @@ vc-git-dir-status-files :files files :update-function update-function))) +(defun vc-git-dir--branch-headers () + "Return headers for branch-related information." + (let ((branch (vc-git--out-match + '("symbolic-ref" "HEAD") + "^\\(refs/heads/\\)?\\(.+\\)$" 2)) + tracking remote-url) + (if branch + (when-let ((branch-merge + (vc-git--out-match + `("config" ,(concat "branch." branch ".merge")) + "^\\(refs/heads/\\)?\\(.+\\)$" 2)) + (branch-remote + (vc-git--out-match + `("config" ,(concat "branch." branch ".remote")) + "\\([^\n]+\\)" 1))) + (if (string= branch-remote ".") + (setq tracking branch-merge + remote-url "none (tracking local branch)") + (setq tracking (concat branch-remote "/" branch-merge) + remote-url (vc-git-repository-url + default-directory branch-remote)))) + (setq branch "none (detached HEAD)")) + (cl-flet ((fmt (key value) + (concat + (propertize (format "% -11s: " key) 'face 'vc-dir-header) + (propertize value 'face 'vc-dir-header-value)))) + (remove nil (list + (fmt "Branch" branch) + (and tracking (fmt "Tracking" tracking)) + (and remote-url (fmt "Remote" remote-url))))))) + +(defun vc-git-dir--in-progress-headers () + "Return headers for Git commands in progress in this worktree." + (let ((gitdir (vc-git--git-path)) + cmds) + ;; See contrib/completion/git-prompt.sh in git.git. + (when (or (file-directory-p + (expand-file-name "rebase-merge" gitdir)) + (file-exists-p + (expand-file-name "rebase-apply/rebasing" gitdir))) + (push 'rebase cmds)) + (when (file-exists-p + (expand-file-name "rebase-apply/applying" gitdir)) + (push 'am cmds)) + (when (file-exists-p (expand-file-name "MERGE_HEAD" gitdir)) + (push 'merge cmds)) + (when (file-exists-p (expand-file-name "BISECT_START" gitdir)) + (push 'bisect cmds)) + (cl-flet ((fmt (cmd name) + (when (memq cmd cmds) + ;; For now just a heading, key bindings can be added + ;; later for various bisect actions. + (propertize (format "% -11s: in progress" name) + 'face 'vc-dir-status-warning)))) + (remove nil (list (fmt 'bisect "Bisect") + (fmt 'rebase "Rebase")))))) + (defvar-keymap vc-git-stash-shared-map "S" #'vc-git-stash-snapshot "C" #'vc-git-stash) @@ -797,130 +854,75 @@ vc-git-stash-menu-map :help "Show the contents of the current stash")) map)) -(defun vc-git--cmds-in-progress () - "Return a list of Git commands in progress in this worktree." - (let ((gitdir (vc-git--git-path)) - cmds) - ;; See contrib/completion/git-prompt.sh in git.git. - (when (or (file-directory-p - (expand-file-name "rebase-merge" gitdir)) - (file-exists-p - (expand-file-name "rebase-apply/rebasing" gitdir))) - (push 'rebase cmds)) - (when (file-exists-p - (expand-file-name "rebase-apply/applying" gitdir)) - (push 'am cmds)) - (when (file-exists-p (expand-file-name "MERGE_HEAD" gitdir)) - (push 'merge cmds)) - (when (file-exists-p (expand-file-name "BISECT_START" gitdir)) - (push 'bisect cmds)) - cmds)) +(defun vc-git-dir--stash-headers () + "Return headers describing the current stashes." + (list + (concat + (propertize "Stash : " 'face 'vc-dir-header) + (if-let ((stash-list (vc-git-stash-list))) + (let* ((len (length stash-list)) + (limit + (if (integerp vc-git-show-stash) + (min vc-git-show-stash len) + len)) + (shown-stashes (cl-subseq stash-list 0 limit)) + (hidden-stashes (cl-subseq stash-list limit)) + (all-hideable (or (eq vc-git-show-stash t) + (<= len vc-git-show-stash)))) + (concat + ;; Button to toggle visibility. + (if all-hideable + (vc-git-make-stash-button nil limit limit) + (vc-git-make-stash-button t vc-git-show-stash len)) + ;; Stash list. + (when shown-stashes + (concat + (propertize "\n" + 'vc-git-hideable all-hideable) + (mapconcat + (lambda (x) + (propertize x + 'face 'vc-dir-header-value + 'mouse-face 'highlight + 'vc-git-hideable all-hideable + 'help-echo vc-git-stash-list-help + 'keymap vc-git-stash-map)) + shown-stashes + (propertize "\n" + 'vc-git-hideable all-hideable)))) + (when hidden-stashes + (concat + (propertize "\n" + 'invisible t + 'vc-git-hideable t) + (mapconcat + (lambda (x) + (propertize x + 'face 'vc-dir-header-value + 'mouse-face 'highlight + 'invisible t + 'vc-git-hideable t + 'help-echo vc-git-stash-list-help + 'keymap vc-git-stash-map)) + hidden-stashes + (propertize "\n" + 'invisible t + 'vc-git-hideable t)))))) + (propertize "Nothing stashed" + 'help-echo vc-git-stash-shared-help + 'keymap vc-git-stash-shared-map + 'face 'vc-dir-header-value))))) (defun vc-git-dir-extra-headers (dir) - (let ((str (vc-git--out-str "symbolic-ref" "HEAD")) - (stash-list (vc-git-stash-list)) - (default-directory dir) - (in-progress (vc-git--cmds-in-progress)) - - branch remote-url stash-button stash-string tracking-branch) - (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) - (progn - (setq branch (match-string 2 str)) - (let ((remote (vc-git--out-str - "config" (concat "branch." branch ".remote"))) - (merge (vc-git--out-str - "config" (concat "branch." branch ".merge")))) - (when (string-match "\\([^\n]+\\)" remote) - (setq remote (match-string 1 remote))) - (when (string-match "^\\(refs/heads/\\)?\\(.+\\)$" merge) - (setq tracking-branch (match-string 2 merge))) - (pcase remote - ("." - (setq remote-url "none (tracking local branch)")) - ((pred (not string-empty-p)) - (setq - remote-url (vc-git-repository-url dir remote) - tracking-branch (concat remote "/" tracking-branch)))))) - (setq branch "none (detached HEAD)")) - (when stash-list - (let* ((len (length stash-list)) - (limit - (if (integerp vc-git-show-stash) - (min vc-git-show-stash len) - len)) - (shown-stashes (cl-subseq stash-list 0 limit)) - (hidden-stashes (cl-subseq stash-list limit)) - (all-hideable (or (eq vc-git-show-stash t) - (<= len vc-git-show-stash)))) - (setq stash-button (if all-hideable - (vc-git-make-stash-button nil limit limit) - (vc-git-make-stash-button t vc-git-show-stash len)) - stash-string - (concat - (when shown-stashes - (concat - (propertize "\n" - 'vc-git-hideable all-hideable) - (mapconcat - (lambda (x) - (propertize x - 'face 'vc-dir-header-value - 'mouse-face 'highlight - 'vc-git-hideable all-hideable - 'help-echo vc-git-stash-list-help - 'keymap vc-git-stash-map)) - shown-stashes - (propertize "\n" - 'vc-git-hideable all-hideable)))) - (when hidden-stashes - (concat - (propertize "\n" - 'invisible t - 'vc-git-hideable t) - (mapconcat - (lambda (x) - (propertize x - 'face 'vc-dir-header-value - 'mouse-face 'highlight - 'invisible t - 'vc-git-hideable t - 'help-echo vc-git-stash-list-help - 'keymap vc-git-stash-map)) - hidden-stashes - (propertize "\n" - 'invisible t - 'vc-git-hideable t)))))))) - (concat - (propertize "Branch : " 'face 'vc-dir-header) - (propertize branch - 'face 'vc-dir-header-value) - (when tracking-branch - (concat - "\n" - (propertize "Tracking : " 'face 'vc-dir-header) - (propertize tracking-branch 'face 'vc-dir-header-value))) - (when remote-url - (concat - "\n" - (propertize "Remote : " 'face 'vc-dir-header) - (propertize remote-url - 'face 'vc-dir-header-value))) - ;; For now just a heading, key bindings can be added later for various bisect actions - (when (memq 'bisect in-progress) - (propertize "\nBisect : in progress" 'face 'vc-dir-status-warning)) - (when (memq 'rebase in-progress) - (propertize "\nRebase : in progress" 'face 'vc-dir-status-warning)) - (if stash-list - (concat - (propertize "\nStash : " 'face 'vc-dir-header) - stash-button - stash-string) - (concat - (propertize "\nStash : " 'face 'vc-dir-header) - (propertize "Nothing stashed" - 'help-echo vc-git-stash-shared-help - 'keymap vc-git-stash-shared-map - 'face 'vc-dir-header-value)))))) + (let ((default-directory dir)) + (string-join + (append + ;; Each helper returns a list of headers. Each header must be a + ;; propertized string with no final newline. + (vc-git-dir--branch-headers) + (vc-git-dir--in-progress-headers) + (vc-git-dir--stash-headers)) + "\n"))) (defun vc-git-branches () "Return the existing branches, as a list of strings. @@ -2246,6 +2248,13 @@ vc-git--out-str (with-current-buffer standard-output (apply #'vc-git--out-ok command args)))) +(defun vc-git--out-match (args regexp group) + "Run `git ARGS...' and return match for group number GROUP of REGEXP. +Return nil if the output does not match. The exit status is ignored." + (let ((out (apply #'vc-git--out-str args))) + (when (string-match regexp out) + (match-string group out)))) + (defun vc-git--run-command-string (file &rest args) "Run a git command on FILE and return its output as string. FILE can be nil." -- 2.39.2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0003-Let-users-choose-when-and-how-to-display-Git-trackin.patch >From f21546f5cae71f00a73298315f00f7693cb21d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Sun, 7 Jul 2024 19:45:49 +0200 Subject: [PATCH 3/3] Let users choose when and how to display Git tracking branch For bug#68183. * lisp/vc/vc-git.el (vc-git-dir-show-tracking): New option. (vc-git-dir--tracking): New function to format upstream branch according to the new option. (vc-git-dir--branch-headers): Use new option & new function to format upstream branch according to user preference. * test/lisp/vc/vc-git-tests.el (vc-git-test--dir-headers): Allow temporarily binding the new option. (vc-git-test-dir-branch-headers): Test a handful of option tweaks. --- lisp/vc/vc-git.el | 101 ++++++++++++++++++++++++++++++----- test/lisp/vc/vc-git-tests.el | 72 ++++++++++++++++++------- 2 files changed, 140 insertions(+), 33 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 4d631c7e032..86752bd074d 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -717,6 +717,66 @@ vc-git-dir-status-files :files files :update-function update-function))) +(defcustom vc-git-dir-show-tracking '((when . set) + (how . header)) + "Control how `vc-dir' shows the upstream branch. +The \"upstream\" branch is the one `vc-pull' fetches changes from by +default. In Git terms, when checking out branch B, the upstream branch +is defined by the configuration options branch.B.merge and +branch.B.remote. + +This option is an alist which admits the following symbol keys: + +* `when' controls whether information about the upstream branch will be + shown. The value for this key can be one of the following symbols: + - set (default) Only show the upstream branch if it is set, + as defined by the previously mentioned Git config + options. + - t If a branch is checked out (that is, HEAD is not + detached), always show something: fallback to \"none\" + if the current branch is not tracking anything. + - different Only show the upstream branch if branch.B.merge is + named differently from B. This allows hiding the + header in the common case where branch \"foo\" tracks + \"origin/foo\". + - never Never show the upstream branch. + +* `how' controls the way this information will be shown. The value can + be one of the following symbols: + - header (default) Show the branch in a dedicated header, + \"Tracking\". + - inline Append the branch to the \"Branch\" header, e.g. + Branch: foo (tracking origin/bar)" + :type 'alist + :options + '((when (radio + (const :tag "Never" never) + (const :tag "Always" t) + (const :tag "If current branch has a tracking branch" set) + (const :tag "If current & tracking branches have different names" different))) + (how (radio + (const :tag "\"Tracking\" header" header) + (const :tag "Inline in \"Branch\" header" inline)))) + :version "31.1") + +(defun vc-git-dir--tracking (branch branch-merge branch-remote) + "Return a description of BRANCH's upstream branch. +This description heeds `vc-git-dir-show-tracking'." + (cl-flet ((remote-prefix () + (if (equal branch-remote ".") + nil + (concat branch-remote "/")))) + (pcase-exhaustive (alist-get 'when vc-git-dir-show-tracking 'set) + ('set (and branch-merge + (concat (remote-prefix) branch-merge))) + ('never nil) + ('t (if branch-merge + (concat (remote-prefix) branch-merge) + "none")) + ('different (and branch-merge + (not (equal branch branch-merge)) + (concat (remote-prefix) branch-merge)))))) + (defun vc-git-dir--branch-headers () "Return headers for branch-related information." (let ((branch (vc-git--out-match @@ -724,25 +784,38 @@ vc-git-dir--branch-headers "^\\(refs/heads/\\)?\\(.+\\)$" 2)) tracking remote-url) (if branch - (when-let ((branch-merge - (vc-git--out-match - `("config" ,(concat "branch." branch ".merge")) - "^\\(refs/heads/\\)?\\(.+\\)$" 2)) - (branch-remote - (vc-git--out-match - `("config" ,(concat "branch." branch ".remote")) - "\\([^\n]+\\)" 1))) - (if (string= branch-remote ".") - (setq tracking branch-merge - remote-url "none (tracking local branch)") - (setq tracking (concat branch-remote "/" branch-merge) - remote-url (vc-git-repository-url - default-directory branch-remote)))) + (let ((branch-merge + (vc-git--out-match + `("config" ,(concat "branch." branch ".merge")) + "^\\(refs/heads/\\)?\\(.+\\)$" 2)) + (branch-remote + (vc-git--out-match + `("config" ,(concat "branch." branch ".remote")) + "\\([^\n]+\\)" 1))) + ;; Either BRANCH-MERGE and BRANCH-REMOTE are both set, or + ;; neither are. + (cl-assert + (eq (not (not branch-merge)) + (not (not branch-remote))) + nil "Inconsistent branch settings: merge is %s; remote is %s" + branch-merge branch-remote) + (setq tracking (vc-git-dir--tracking + branch branch-merge branch-remote) + remote-url (and branch-remote + (if (equal branch-remote ".") + "none (tracking local branch)" + (vc-git-repository-url + default-directory branch-remote))))) (setq branch "none (detached HEAD)")) (cl-flet ((fmt (key value) (concat (propertize (format "% -11s: " key) 'face 'vc-dir-header) (propertize value 'face 'vc-dir-header-value)))) + (when (and tracking + (eq (alist-get 'how vc-git-dir-show-tracking 'header) + 'inline)) + (setq branch (format "%s (tracking %s)" branch tracking) + tracking nil)) (remove nil (list (fmt "Branch" branch) (and tracking (fmt "Tracking" tracking)) diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 2dbf5a8df12..4ece262564e 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -119,29 +119,34 @@ vc-git-test--start-branch (vc-git-test--run "commit" "-mFirst") (string-trim (vc-git-test--run "branch" "--show-current"))) -(defun vc-git-test--dir-headers (headers) +(defun vc-git-test--dir-headers (headers &optional show-tracking) "Return an alist of header values for the current `vc-dir' buffer. HEADERS should be a list of (NAME ...) strings. This function will return a list of (NAME . VALUE) pairs, where VALUE is nil if the header -is absent." - ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) - (revert-buffer) - (mapcar - (lambda (header) - (let* ((pattern - (rx bol - (literal header) (* space) ": " (group (+ nonl)) - eol)) - (value (and (goto-char (point-min)) - (re-search-forward pattern nil t) - (match-string 1)))) - (cons header value))) - headers)) +is absent. + +SHOW-TRACKING is a temporary value to bind `vc-git-dir-show-tracking' +to. If omitted, the default value will be kept." + (let ((vc-git-dir-show-tracking (or show-tracking + vc-git-dir-show-tracking))) + ;; FIXME: to reproduce interactive sessions faithfully, we would need + ;; to wait for the dir-status-files process to terminate; have not + ;; found a reliable way to do this. As a workaround, kill pending + ;; processes and revert the `vc-dir' buffer. + (vc-dir-kill-dir-status-process) + (revert-buffer) + (mapcar + (lambda (header) + (let* ((pattern + (rx bol + (literal header) (* space) ": " (group (+ nonl)) + eol)) + (value (and (goto-char (point-min)) + (re-search-forward pattern nil t) + (match-string 1)))) + (cons header value))) + headers))) (ert-deftest vc-git-test-dir-branch-headers () "Check that `vc-dir' shows expected branch-related headers." @@ -153,6 +158,8 @@ vc-git-test-dir-branch-headers (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) (vc-dir clone-repo) + + ;; Post-clone: on MAIN-BRANCH, tracking origin/MAIN-BRANCH. (should (equal (vc-git-test--dir-headers @@ -160,6 +167,25 @@ vc-git-test-dir-branch-headers `(("Branch" . ,main-branch) ("Tracking" . ,(concat "origin/" main-branch)) ("Remote" . ,origin-repo)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((how . inline))) + `(("Branch" . ,(format "%s (tracking origin/%s)" main-branch main-branch)) + ("Tracking" . nil)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((when . different))) + `(("Branch" . ,main-branch) + ("Tracking" . nil)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((when . never))) + `(("Branch" . ,main-branch) + ("Tracking" . nil)))) + ;; Checkout a new branch: no tracking information. (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) (should @@ -169,6 +195,13 @@ vc-git-test-dir-branch-headers '(("Branch" . "feature/foo") ("Tracking" . nil) ("Remote" . nil)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((when . t))) + '(("Branch" . "feature/foo") + ("Tracking" . "none")))) + ;; Push with '--set-upstream origin': tracking information ;; should be updated. (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") @@ -179,6 +212,7 @@ vc-git-test-dir-branch-headers `(("Branch" . "feature/foo") ("Tracking" . "origin/feature/foo") ("Remote" . ,origin-repo)))) + ;; Checkout a new branch tracking the _local_ main branch. ;; Bug#68183. (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-branch) -- 2.39.2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=squashed.patch >From 2de70ea79a5d8eb98e0dcd4ef0598a8e033b6526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Sun, 7 Jul 2024 12:16:12 +0200 Subject: [PATCH] Let users choose when and how to display Git tracking branch While in there, split vc-git-dir-extra-headers into more manageable chunks. The current code requires a lot of eyeballing back-and-forth to: - check where variables are actually used, what impact changing them can have: in actuality, there are three distinct "groups" of headers we compute, each with their own independent state; - understand formatting details such as "who's in charge of the newlines". To solve both issues, split that function into smaller ones, each handling a "group" of headers. The only expected "functional" change is that, by propertizing "\nHeader: " strings, the original code sometimes applied the vc-dir-header face to the newline preceding a header; the new code applies no faces to these newlines. This change would be visible to users with themes adding an :extended background to vc-dir-header. In practice, no in-tree theme is impacted. For bug#68183. * lisp/vc/vc-git.el (vc-git-dir-show-tracking): New option. (vc-git-dir--tracking): New function to format upstream branch according to the new option. (vc-git-dir--branch-headers): New function to compute "Branch", "Tracking" and "Remote". (vc-git--cmds-in-progress): Rename to... (vc-git-dir--in-progress-headers): ... this, and compute headers. (vc-git-dir--stash-headers): New function to compute the "Stash" header. (vc-git-dir-extra-headers): Boil down to just setting default-directory and assembling the headers from these new helpers. (vc-git--out-match): New function to call 'git' and capture specific bits of output. * test/lisp/vc/vc-git-tests.el (vc-git-test-dir-track-local-branch): Remove in favor of new test. (vc-git-test--start-branch): New helper to get a repository going. (vc-git-test--dir-headers): New helper to get a list of headers in the current vc-dir buffer. (vc-git-test-dir-branch-headers): New test, exercising the original bug recipe plus more common scenarios, as well as some option tweaks. --- lisp/vc/vc-git.el | 326 ++++++++++++++++++++++------------- test/lisp/vc/vc-git-tests.el | 132 ++++++++++++-- 2 files changed, 318 insertions(+), 140 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index e8257c5dbd0..86752bd074d 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -717,6 +717,136 @@ vc-git-dir-status-files :files files :update-function update-function))) +(defcustom vc-git-dir-show-tracking '((when . set) + (how . header)) + "Control how `vc-dir' shows the upstream branch. +The \"upstream\" branch is the one `vc-pull' fetches changes from by +default. In Git terms, when checking out branch B, the upstream branch +is defined by the configuration options branch.B.merge and +branch.B.remote. + +This option is an alist which admits the following symbol keys: + +* `when' controls whether information about the upstream branch will be + shown. The value for this key can be one of the following symbols: + - set (default) Only show the upstream branch if it is set, + as defined by the previously mentioned Git config + options. + - t If a branch is checked out (that is, HEAD is not + detached), always show something: fallback to \"none\" + if the current branch is not tracking anything. + - different Only show the upstream branch if branch.B.merge is + named differently from B. This allows hiding the + header in the common case where branch \"foo\" tracks + \"origin/foo\". + - never Never show the upstream branch. + +* `how' controls the way this information will be shown. The value can + be one of the following symbols: + - header (default) Show the branch in a dedicated header, + \"Tracking\". + - inline Append the branch to the \"Branch\" header, e.g. + Branch: foo (tracking origin/bar)" + :type 'alist + :options + '((when (radio + (const :tag "Never" never) + (const :tag "Always" t) + (const :tag "If current branch has a tracking branch" set) + (const :tag "If current & tracking branches have different names" different))) + (how (radio + (const :tag "\"Tracking\" header" header) + (const :tag "Inline in \"Branch\" header" inline)))) + :version "31.1") + +(defun vc-git-dir--tracking (branch branch-merge branch-remote) + "Return a description of BRANCH's upstream branch. +This description heeds `vc-git-dir-show-tracking'." + (cl-flet ((remote-prefix () + (if (equal branch-remote ".") + nil + (concat branch-remote "/")))) + (pcase-exhaustive (alist-get 'when vc-git-dir-show-tracking 'set) + ('set (and branch-merge + (concat (remote-prefix) branch-merge))) + ('never nil) + ('t (if branch-merge + (concat (remote-prefix) branch-merge) + "none")) + ('different (and branch-merge + (not (equal branch branch-merge)) + (concat (remote-prefix) branch-merge)))))) + +(defun vc-git-dir--branch-headers () + "Return headers for branch-related information." + (let ((branch (vc-git--out-match + '("symbolic-ref" "HEAD") + "^\\(refs/heads/\\)?\\(.+\\)$" 2)) + tracking remote-url) + (if branch + (let ((branch-merge + (vc-git--out-match + `("config" ,(concat "branch." branch ".merge")) + "^\\(refs/heads/\\)?\\(.+\\)$" 2)) + (branch-remote + (vc-git--out-match + `("config" ,(concat "branch." branch ".remote")) + "\\([^\n]+\\)" 1))) + ;; Either BRANCH-MERGE and BRANCH-REMOTE are both set, or + ;; neither are. + (cl-assert + (eq (not (not branch-merge)) + (not (not branch-remote))) + nil "Inconsistent branch settings: merge is %s; remote is %s" + branch-merge branch-remote) + (setq tracking (vc-git-dir--tracking + branch branch-merge branch-remote) + remote-url (and branch-remote + (if (equal branch-remote ".") + "none (tracking local branch)" + (vc-git-repository-url + default-directory branch-remote))))) + (setq branch "none (detached HEAD)")) + (cl-flet ((fmt (key value) + (concat + (propertize (format "% -11s: " key) 'face 'vc-dir-header) + (propertize value 'face 'vc-dir-header-value)))) + (when (and tracking + (eq (alist-get 'how vc-git-dir-show-tracking 'header) + 'inline)) + (setq branch (format "%s (tracking %s)" branch tracking) + tracking nil)) + (remove nil (list + (fmt "Branch" branch) + (and tracking (fmt "Tracking" tracking)) + (and remote-url (fmt "Remote" remote-url))))))) + +(defun vc-git-dir--in-progress-headers () + "Return headers for Git commands in progress in this worktree." + (let ((gitdir (vc-git--git-path)) + cmds) + ;; See contrib/completion/git-prompt.sh in git.git. + (when (or (file-directory-p + (expand-file-name "rebase-merge" gitdir)) + (file-exists-p + (expand-file-name "rebase-apply/rebasing" gitdir))) + (push 'rebase cmds)) + (when (file-exists-p + (expand-file-name "rebase-apply/applying" gitdir)) + (push 'am cmds)) + (when (file-exists-p (expand-file-name "MERGE_HEAD" gitdir)) + (push 'merge cmds)) + (when (file-exists-p (expand-file-name "BISECT_START" gitdir)) + (push 'bisect cmds)) + (cl-flet ((fmt (cmd name) + (when (memq cmd cmds) + ;; For now just a heading, key bindings can be added + ;; later for various bisect actions. + (propertize (format "% -11s: in progress" name) + 'face 'vc-dir-status-warning)))) + (remove nil (list (fmt 'bisect "Bisect") + (fmt 'rebase "Rebase")))))) + (defvar-keymap vc-git-stash-shared-map "S" #'vc-git-stash-snapshot "C" #'vc-git-stash) @@ -797,130 +927,75 @@ vc-git-stash-menu-map :help "Show the contents of the current stash")) map)) -(defun vc-git--cmds-in-progress () - "Return a list of Git commands in progress in this worktree." - (let ((gitdir (vc-git--git-path)) - cmds) - ;; See contrib/completion/git-prompt.sh in git.git. - (when (or (file-directory-p - (expand-file-name "rebase-merge" gitdir)) - (file-exists-p - (expand-file-name "rebase-apply/rebasing" gitdir))) - (push 'rebase cmds)) - (when (file-exists-p - (expand-file-name "rebase-apply/applying" gitdir)) - (push 'am cmds)) - (when (file-exists-p (expand-file-name "MERGE_HEAD" gitdir)) - (push 'merge cmds)) - (when (file-exists-p (expand-file-name "BISECT_START" gitdir)) - (push 'bisect cmds)) - cmds)) +(defun vc-git-dir--stash-headers () + "Return headers describing the current stashes." + (list + (concat + (propertize "Stash : " 'face 'vc-dir-header) + (if-let ((stash-list (vc-git-stash-list))) + (let* ((len (length stash-list)) + (limit + (if (integerp vc-git-show-stash) + (min vc-git-show-stash len) + len)) + (shown-stashes (cl-subseq stash-list 0 limit)) + (hidden-stashes (cl-subseq stash-list limit)) + (all-hideable (or (eq vc-git-show-stash t) + (<= len vc-git-show-stash)))) + (concat + ;; Button to toggle visibility. + (if all-hideable + (vc-git-make-stash-button nil limit limit) + (vc-git-make-stash-button t vc-git-show-stash len)) + ;; Stash list. + (when shown-stashes + (concat + (propertize "\n" + 'vc-git-hideable all-hideable) + (mapconcat + (lambda (x) + (propertize x + 'face 'vc-dir-header-value + 'mouse-face 'highlight + 'vc-git-hideable all-hideable + 'help-echo vc-git-stash-list-help + 'keymap vc-git-stash-map)) + shown-stashes + (propertize "\n" + 'vc-git-hideable all-hideable)))) + (when hidden-stashes + (concat + (propertize "\n" + 'invisible t + 'vc-git-hideable t) + (mapconcat + (lambda (x) + (propertize x + 'face 'vc-dir-header-value + 'mouse-face 'highlight + 'invisible t + 'vc-git-hideable t + 'help-echo vc-git-stash-list-help + 'keymap vc-git-stash-map)) + hidden-stashes + (propertize "\n" + 'invisible t + 'vc-git-hideable t)))))) + (propertize "Nothing stashed" + 'help-echo vc-git-stash-shared-help + 'keymap vc-git-stash-shared-map + 'face 'vc-dir-header-value))))) (defun vc-git-dir-extra-headers (dir) - (let ((str (vc-git--out-str "symbolic-ref" "HEAD")) - (stash-list (vc-git-stash-list)) - (default-directory dir) - (in-progress (vc-git--cmds-in-progress)) - - branch remote-url stash-button stash-string tracking-branch) - (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) - (progn - (setq branch (match-string 2 str)) - (let ((remote (vc-git--out-str - "config" (concat "branch." branch ".remote"))) - (merge (vc-git--out-str - "config" (concat "branch." branch ".merge")))) - (when (string-match "\\([^\n]+\\)" remote) - (setq remote (match-string 1 remote))) - (when (string-match "^\\(refs/heads/\\)?\\(.+\\)$" merge) - (setq tracking-branch (match-string 2 merge))) - (pcase remote - ("." - (setq remote-url "none (tracking local branch)")) - ((pred (not string-empty-p)) - (setq - remote-url (vc-git-repository-url dir remote) - tracking-branch (concat remote "/" tracking-branch)))))) - (setq branch "none (detached HEAD)")) - (when stash-list - (let* ((len (length stash-list)) - (limit - (if (integerp vc-git-show-stash) - (min vc-git-show-stash len) - len)) - (shown-stashes (cl-subseq stash-list 0 limit)) - (hidden-stashes (cl-subseq stash-list limit)) - (all-hideable (or (eq vc-git-show-stash t) - (<= len vc-git-show-stash)))) - (setq stash-button (if all-hideable - (vc-git-make-stash-button nil limit limit) - (vc-git-make-stash-button t vc-git-show-stash len)) - stash-string - (concat - (when shown-stashes - (concat - (propertize "\n" - 'vc-git-hideable all-hideable) - (mapconcat - (lambda (x) - (propertize x - 'face 'vc-dir-header-value - 'mouse-face 'highlight - 'vc-git-hideable all-hideable - 'help-echo vc-git-stash-list-help - 'keymap vc-git-stash-map)) - shown-stashes - (propertize "\n" - 'vc-git-hideable all-hideable)))) - (when hidden-stashes - (concat - (propertize "\n" - 'invisible t - 'vc-git-hideable t) - (mapconcat - (lambda (x) - (propertize x - 'face 'vc-dir-header-value - 'mouse-face 'highlight - 'invisible t - 'vc-git-hideable t - 'help-echo vc-git-stash-list-help - 'keymap vc-git-stash-map)) - hidden-stashes - (propertize "\n" - 'invisible t - 'vc-git-hideable t)))))))) - (concat - (propertize "Branch : " 'face 'vc-dir-header) - (propertize branch - 'face 'vc-dir-header-value) - (when tracking-branch - (concat - "\n" - (propertize "Tracking : " 'face 'vc-dir-header) - (propertize tracking-branch 'face 'vc-dir-header-value))) - (when remote-url - (concat - "\n" - (propertize "Remote : " 'face 'vc-dir-header) - (propertize remote-url - 'face 'vc-dir-header-value))) - ;; For now just a heading, key bindings can be added later for various bisect actions - (when (memq 'bisect in-progress) - (propertize "\nBisect : in progress" 'face 'vc-dir-status-warning)) - (when (memq 'rebase in-progress) - (propertize "\nRebase : in progress" 'face 'vc-dir-status-warning)) - (if stash-list - (concat - (propertize "\nStash : " 'face 'vc-dir-header) - stash-button - stash-string) - (concat - (propertize "\nStash : " 'face 'vc-dir-header) - (propertize "Nothing stashed" - 'help-echo vc-git-stash-shared-help - 'keymap vc-git-stash-shared-map - 'face 'vc-dir-header-value)))))) + (let ((default-directory dir)) + (string-join + (append + ;; Each helper returns a list of headers. Each header must be a + ;; propertized string with no final newline. + (vc-git-dir--branch-headers) + (vc-git-dir--in-progress-headers) + (vc-git-dir--stash-headers)) + "\n"))) (defun vc-git-branches () "Return the existing branches, as a list of strings. @@ -2246,6 +2321,13 @@ vc-git--out-str (with-current-buffer standard-output (apply #'vc-git--out-ok command args)))) +(defun vc-git--out-match (args regexp group) + "Run `git ARGS...' and return match for group number GROUP of REGEXP. +Return nil if the output does not match. The exit status is ignored." + (let ((out (apply #'vc-git--out-str args))) + (when (string-match regexp out) + (match-string group out)))) + (defun vc-git--run-command-string (file &rest args) "Run a git command on FILE and return its output as string. FILE can be nil." diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index f15a0f52e8c..4ece262564e 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -26,6 +26,7 @@ (require 'ert-x) (require 'vc) +(require 'vc-dir) (require 'vc-git) (ert-deftest vc-git-test-program-version-general () @@ -108,24 +109,119 @@ vc-git-test--run (apply 'vc-git-command t 0 nil args) (buffer-string))) -(ert-deftest vc-git-test-dir-track-local-branch () - "Test that `vc-dir' works when tracking local branches. Bug#68183." +(defun vc-git-test--start-branch () + "Get a branch started in a freshly initialized repository. + +This returns the name of the current branch, so that tests can remain +agnostic of init.defaultbranch." + (write-region "hello" nil "README") + (vc-git-test--run "add" "README") + (vc-git-test--run "commit" "-mFirst") + (string-trim (vc-git-test--run "branch" "--show-current"))) + +(defun vc-git-test--dir-headers (headers &optional show-tracking) + "Return an alist of header values for the current `vc-dir' buffer. + +HEADERS should be a list of (NAME ...) strings. This function will +return a list of (NAME . VALUE) pairs, where VALUE is nil if the header +is absent. + +SHOW-TRACKING is a temporary value to bind `vc-git-dir-show-tracking' +to. If omitted, the default value will be kept." + (let ((vc-git-dir-show-tracking (or show-tracking + vc-git-dir-show-tracking))) + ;; FIXME: to reproduce interactive sessions faithfully, we would need + ;; to wait for the dir-status-files process to terminate; have not + ;; found a reliable way to do this. As a workaround, kill pending + ;; processes and revert the `vc-dir' buffer. + (vc-dir-kill-dir-status-process) + (revert-buffer) + (mapcar + (lambda (header) + (let* ((pattern + (rx bol + (literal header) (* space) ": " (group (+ nonl)) + eol)) + (value (and (goto-char (point-min)) + (re-search-forward pattern nil t) + (match-string 1)))) + (cons header value))) + headers))) + +(ert-deftest vc-git-test-dir-branch-headers () + "Check that `vc-dir' shows expected branch-related headers." (skip-unless (executable-find vc-git-program)) - (vc-git-test--with-repo repo - ;; Create an initial commit to get a branch started. - (write-region "hello" nil "README") - (vc-git-test--run "add" "README") - (vc-git-test--run "commit" "-mFirst") - ;; Get current branch name lazily, to remain agnostic of - ;; init.defaultbranch. - (let ((upstream-branch - (string-trim (vc-git-test--run "branch" "--show-current")))) - (vc-git-test--run "checkout" "--track" "-b" "hack" upstream-branch) - (vc-dir default-directory) - (pcase-dolist (`(,header ,value) - `(("Branch" "hack") - ("Tracking" ,upstream-branch))) - (goto-char (point-min)) - (re-search-forward (format "^%s *: %s$" header value)))))) + ;; Create a repository that will serve as the "remote". + (vc-git-test--with-repo origin-repo + (let ((main-branch (vc-git-test--start-branch))) + ;; 'git clone' this repository and test things in this clone. + (ert-with-temp-directory clone-repo + (vc-git-test--run "clone" origin-repo clone-repo) + (vc-dir clone-repo) + + ;; Post-clone: on MAIN-BRANCH, tracking origin/MAIN-BRANCH. + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . ,main-branch) + ("Tracking" . ,(concat "origin/" main-branch)) + ("Remote" . ,origin-repo)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((how . inline))) + `(("Branch" . ,(format "%s (tracking origin/%s)" main-branch main-branch)) + ("Tracking" . nil)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((when . different))) + `(("Branch" . ,main-branch) + ("Tracking" . nil)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((when . never))) + `(("Branch" . ,main-branch) + ("Tracking" . nil)))) + + ;; Checkout a new branch: no tracking information. + (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + '(("Branch" . "feature/foo") + ("Tracking" . nil) + ("Remote" . nil)))) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking") '((when . t))) + '(("Branch" . "feature/foo") + ("Tracking" . "none")))) + + ;; Push with '--set-upstream origin': tracking information + ;; should be updated. + (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/foo") + ("Tracking" . "origin/feature/foo") + ("Remote" . ,origin-repo)))) + + ;; Checkout a new branch tracking the _local_ main branch. + ;; Bug#68183. + (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/bar") + ("Tracking" . ,main-branch) + ("Remote" . "none (tracking local branch)")))))))) ;;; vc-git-tests.el ends here -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 20:33:09 2024 Received: (at 68183) by debbugs.gnu.org; 8 Aug 2024 00:33:09 +0000 Received: from localhost ([127.0.0.1]:35230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbr5Z-0007gc-Fl for submit@debbugs.gnu.org; Wed, 07 Aug 2024 20:33:09 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:57428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbr5W-0007g4-8q for 68183@debbugs.gnu.org; Wed, 07 Aug 2024 20:33:07 -0400 DKIM-Signature: a=rsa-sha256; b=ZB/r1wAwc5cVijh2/nvdetRkCZxI2lAEH/Owh13MI/wa6tiflst5Z/8tOGI2oKnCc3e90ZXh14uL/NPiN5g5IZ2EIT/73/Oa58+V3nbOsihB6uUouXKS2/W8FehKR0vhBVx+dC87UohV+pS+7JJ0hEhuBPTBnbSsFHWCQnp+bwk7/ATSdh/GmjCGGVtZv/uE4JBdkbTO589uselWZ8mgzKuxBidaCUpdgJjMpkCJmESZdIyYnUn5PzaaQHkaxPL7FNEmTZ29INkh7dlUrzP69rHye7CqqUWuFffNPXUvOxJftOL4ORZQ8TvFqurwYiUUQ7j6OmxJ6+CTOgckls7Ltg==; s=purelymail3; d=spwhitton.name; v=1; bh=xTMvBLyKxrOocjrARjcTEZXqX61UihdwQqIPrtY5ud8=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=aeGhYJ8uDNroPhRHIXaHV3Ny57dAWFXLU7a54RqptwAwXh0ltnwo6U7LCMiwFLm05bI1s+/1qSZno6dEnZUcQZV5rZO6JyJZaDkodX+utT+6YyEzXzteNaTUD02kLmHGnj0C/Kht3MKlcpsdAzPm+uIeL/20jsc0kH4GiCyGjR7Usz5jO0NdVpOmo+7N3yGkPV9HD24yw8V8kM98ipCDSQLDWSu6Td4zMMsANQGWyd/V0Zqj5zGDLfVo7dpzcfT2YLMnX1esa8byGGt884W53NEkeUytd/NfPwTls9WweoRN2EmJx2YvTE6nT4KQYSLwjm+xBtQQ3vMkGh8sh4uF3Q==; s=purelymail3; d=purelymail.com; v=1; bh=xTMvBLyKxrOocjrARjcTEZXqX61UihdwQqIPrtY5ud8=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 68183@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1750606979; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 08 Aug 2024 00:32:28 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 6E8E57E7D49; Thu, 8 Aug 2024 09:32:26 +0900 (KST) From: Sean Whitton To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <87h6bwqujo.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Wed, 07 Aug 2024 16:25:31 +0200") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> Date: Thu, 08 Aug 2024 08:32:26 +0800 Message-ID: <87wmkronvp.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Wed 07 Aug 2024 at 04:25pm +02, K=C3=A9vin Le Gouguec wrote: > About patch #2, CC'ing Sean Whitton for perspective on > vc-git--cmds-in-progress: I was puzzled by the function supporting many > commands (rebase, am, merge, bisect), whereas AFAICT its sole user only > heeds 'bisect & 'rebase. Wondering if I've missed other in-tree uses, > or if we should add headers for 'am and 'merge, "while in there". I have some WIP which uses this function for some other purposes. It's a pretty cleanly identifiable piece of functionality so I would like to keep it separate. I would be happy if you were to add detecting some other operations there, for sure, if you are confident in your detection methods. --=20 Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 08 03:09:20 2024 Received: (at 68183) by debbugs.gnu.org; 8 Aug 2024 07:09:21 +0000 Received: from localhost ([127.0.0.1]:35402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbxGy-0001IT-Fo for submit@debbugs.gnu.org; Thu, 08 Aug 2024 03:09:20 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:52706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbxGw-0001IF-92 for 68183@debbugs.gnu.org; Thu, 08 Aug 2024 03:09:18 -0400 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42803bbf842so6546885e9.1 for <68183@debbugs.gnu.org>; Thu, 08 Aug 2024 00:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723100865; x=1723705665; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GJR3LFG0rI4sKCT9qu+AM752lkXjym7ByJU1pz4WXlg=; b=ZKiGXiZus1xCgTfsvRQaptBLKh6XL9XErh0t+08if2T6Wyb5hUo6VjLW1XbVrN1TDl csquxiCaaIF1AAl2zYDMZX2ioFCYsNdKonW6q8aOO+dWX1046+Et4/roHcX0R2AAz0n2 j4y0ayZOQzFnlEljicnn8antxgcopYaW5bfMwqPeQZ92uX6AsGFM1+uGkT6/jSR4LKT6 9c9PfeRr6SxINB0YsXVnwD5D3llzyrbR09j6GnsmsZC7W9fW48QncEjI3NxXU7uBN0qI BQByIho4oFLlBpUfITxD25pMbM1cdG7TnB1ITUQ1SCProQKxx8cRni4YPko5bMgKpOEB GEQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723100865; x=1723705665; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GJR3LFG0rI4sKCT9qu+AM752lkXjym7ByJU1pz4WXlg=; b=loZeDqVUgz5/dbjoIal0/lzfgLS5sv1i07ltaeJtWHsthN3thQBTUqQA0GzUBLZo0+ /c9wxhxaBfSMhgGc/Se4T9keD2kAUigZcMbGzlbR63ObmWyPk+7Jqr5L88SC6tTlCpQJ 4uEh24Xapx6VvA9R6k+At4HGdBxL9vIGyGh5A4BrT3CC8H9uK2qObkudCxqPCw7tf0X7 ONifMikJWlHHgYeweCv36yVFoU1gGyxacuX75a+qzVij/wShIH88UTj4sJtV5djPAknX 3Ff6qHlfJ/b5KYgIDqULV8wi8mOq1UNFcyjRaGGDkHx5v+JI/WQTDplP7ybZnPTaRg+Y CJHg== X-Gm-Message-State: AOJu0YwaPxO9OP6zt+Qi7nLQmBNv2iglFQlSlv8vTr2YoCJkIVQ55jxN H6D5X3FzTXyLd6mjyyusaYzt9j44+ea2gXyrpM7sRnLNYGIFyBZQ X-Google-Smtp-Source: AGHT+IEaiC9FxdLannOc2I2aQK0n/pXVZcwN8aIT7xWuNqirzAak/0CUOQYLKm7aun0p73Bv6ROmAA== X-Received: by 2002:a05:600c:3584:b0:428:15b0:c8dd with SMTP id 5b1f17b1804b1-4290af1045bmr11808455e9.20.1723100864571; Thu, 08 Aug 2024 00:07:44 -0700 (PDT) Received: from hirondell ([2001:861:5642:b310:f004:ddf4:26e1:944]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429059a6703sm60077475e9.37.2024.08.08.00.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 00:07:44 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Sean Whitton Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <87wmkronvp.fsf@melete.silentflame.com> (Sean Whitton's message of "Thu, 08 Aug 2024 08:32:26 +0800") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <87wmkronvp.fsf@melete.silentflame.com> Date: Thu, 08 Aug 2024 09:07:43 +0200 Message-ID: <87zfpnlcg0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sean Whitton writes: >> About patch #2, CC'ing Sean Whitton for perspective on >> vc-git--cmds-in-progress: I was puzzled by the function supporting many >> commands (rebase, am, merge, bisect), whereas AFAICT its sole user only >> heeds 'bisect & 'rebase. Wondering if I've missed other in-tree uses, >> or if we should add headers for 'am and 'merge, "while in there". > > I have some WIP which uses this function for some other purposes. > It's a pretty cleanly identifiable piece of functionality so I would > like to keep it separate. Gotcha, thanks for weighing in! Then I'll work on another revision of the series to keep that function intact. > I would be happy if you were to add detecting some other operations > there, for sure, if you are confident in your detection methods. Do you mean that the detection methods for 'am and 'merge currently in place=E2=80=A6 (when (file-exists-p (expand-file-name "rebase-apply/applying" gitdir)) (push 'am cmds)) (when (file-exists-p (expand-file-name "MERGE_HEAD" gitdir)) (push 'merge cmds)) =E2=80=A6 are unreliable somehow? I wasn't planning on detecting more operations, merely adding vc-dir headers for these two, since despite vc-git--cmds-in-progress picking these operations up, vc-git-dir-extra-headers ignores them =F0=9F=98=B6 From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 08 08:02:40 2024 Received: (at 68183) by debbugs.gnu.org; 8 Aug 2024 12:02:40 +0000 Received: from localhost ([127.0.0.1]:35748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sc1qp-0000QF-Tx for submit@debbugs.gnu.org; Thu, 08 Aug 2024 08:02:40 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:35170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sc1qn-0000Q0-AO for 68183@debbugs.gnu.org; Thu, 08 Aug 2024 08:02:38 -0400 DKIM-Signature: a=rsa-sha256; b=eh/NWkx22Jr3knL9yJBPYUb1ktCtfwhbvWa5QhuPwafLu9gxx1h/26fUMfGFFi9Q4cY/YGg3hy4toZasPet0vnb0+YvzgWQpinm3OWyN0Yu05VhtZNspR9WykHBhwfr5gQjNcCV/p+cuKJiKA571yZnB6RMQMQvdVJcn4p4sYMk3nPp1kMSxK1a6+U4hZ5L7UafoMtwNVwZyuAwUltpbvYunJVtsA1AgqoBLhpiX6BpTV9dx2IfU985ldSsmulnqAKTDUnTRNtGKTacd7FelRF++TwnRhAp8I7N2qkPvLSf5jVBvAz52AIDrte6Ytkmz2D4tW4Ney+wDCiebCMTl9A==; s=purelymail3; d=spwhitton.name; v=1; bh=VjpSpHaItrSKEUsywvD87jMgGN0RFbxS9HI9pPwSM44=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=Ac9RhXPujIcCEKx6IzH96KKYSdA99l7YoQKR5FEURdvt+EFGj/HFSN9UcFBO2STam89jYsOeTOWMZRh5RBazj/UUYNK3sCiKAVOmujlvwFFEs7exbjUI9+luRJMBI9WSqyQvinV2x2GpS3KdEglIztwEFl8cj6pBhE+496Gc5daibEX1Dg5uHcMbfQnQ6MLdfn6P/zK8YOrEsBcvKqn3k+/vmCal9bruPTLcOqhljCO0NeUW8T1twJ6zmSJAS6YBqJGT4Ar5GL7uNhnAytafFfIKDF519d0Osm2ZqLtzEMqBVtQIegLqVjOfHkIGBwaxvItbP1CzS+7y5V5e0+zhyw==; s=purelymail3; d=purelymail.com; v=1; bh=VjpSpHaItrSKEUsywvD87jMgGN0RFbxS9HI9pPwSM44=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 68183@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1100803972; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 08 Aug 2024 12:02:02 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 5C5797E09DA; Thu, 8 Aug 2024 21:02:00 +0900 (KST) From: Sean Whitton To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <87zfpnlcg0.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Thu, 08 Aug 2024 09:07:43 +0200") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <87wmkronvp.fsf@melete.silentflame.com> <87zfpnlcg0.fsf@gmail.com> Date: Thu, 08 Aug 2024 20:02:00 +0800 Message-ID: <87sevfmddz.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Thu 08 Aug 2024 at 09:07am +02, K=C3=A9vin Le Gouguec wrote: > Do you mean that the detection methods for 'am and 'merge currently in > place=E2=80=A6 > > (when (file-exists-p > (expand-file-name "rebase-apply/applying" gitdir)) > (push 'am cmds)) > (when (file-exists-p (expand-file-name "MERGE_HEAD" gitdir)) > (push 'merge cmds)) > > =E2=80=A6 are unreliable somehow? I wasn't planning on detecting more > operations, merely adding vc-dir headers for these two, since despite > vc-git--cmds-in-progress picking these operations up, > vc-git-dir-extra-headers ignores them =F0=9F=98=B6 Oh sorry, I misread. Those tests are reliable. Yes -- if you think it would be helpful to have them displayed in vc-dir, it makes sense to me to add them. --=20 Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 12 21:33:27 2024 Received: (at 68183) by debbugs.gnu.org; 13 Aug 2024 01:33:27 +0000 Received: from localhost ([127.0.0.1]:43955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdgPf-0003tr-0p for submit@debbugs.gnu.org; Mon, 12 Aug 2024 21:33:27 -0400 Received: from fout6-smtp.messagingengine.com ([103.168.172.149]:52699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdgPb-0003tT-Vl for 68183@debbugs.gnu.org; Mon, 12 Aug 2024 21:33:25 -0400 Received: from phl-compute-01.internal (phl-compute-01.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id A026F138FC17; Mon, 12 Aug 2024 21:32:45 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 12 Aug 2024 21:32:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1723512765; x=1723599165; bh=H/GEBDmMoUK9s4J01v6Xstueyp489Z+Dg21r9a3DVcc=; b= 0ZgHtx7UbwZ0TeV9EoQMxm8t2MAok7xZ2RbdKj2fa87sZQ3RFx2fOybGhYKsLyKP uZolsb6wvrXopPeZWVWUmkus3vg4Q0oD02XTh7W16BDwGng1jicsC9gRmbuE0e7O al91YDWs96kMdbX75lPAhXl7BLK7xrrc/EQsB9AlrN6E1eLYFtHR96dMoJX8jh52 kNFIMjnY4VeBBEDL7IZH6tBECfTgUIARSBqAc5cW0XMksiCWYyoxGB0gSzT5rPXH F0Q34otFYha5nbTp2jH4wFdqxmO7E3bSDhHH5zdPtQEP/5b8zQD2Zl+TnZCh3oNA 7MxXS3PXNOIYkNor1TqGpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723512765; x= 1723599165; bh=H/GEBDmMoUK9s4J01v6Xstueyp489Z+Dg21r9a3DVcc=; b=N IxWqntM/jrt50JSmqYWUni6nV/aFpWy7ANkpVlUJisl70Cr/7uux5g8OIqyDS0F+ +cMYP/pqx+xT9CF8QIKH+KNjIQPDf9YPDtC4fjnSvpdQYOmDXVPg5pcXMwwEL7s7 7AWSnJ7chrE4mjnuT2BcFtj2pX++X4Tmc8fYKDIQZrQqOiT1E5x49b14HC18K8t1 8otbFhwZWATleA8MhuCyapsCllEKbXNOPCgKGe8jxhVqCaHiDaDKpfrgkM4CItbK q7nuPR42qQMeFRofF2AP+b3a+jlPJ0drYLMAExOJlZpMdmeb9rtRh4rJLNqBhBPG y4ZAXdRwVvPoNVGCbCRvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtuddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveeg tedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehkvghvihhnrdhlvghgohhugh huvggtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepieekudekfeesuggvsggsuhhgshdr ghhnuhdrohhrghdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhope htohhmsehtrhhomhgvhidrtghomhdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhn vghtpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Aug 2024 21:32:42 -0400 (EDT) Message-ID: <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> Date: Tue, 13 Aug 2024 04:32:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= , 68183@debbugs.gnu.org References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87h6bwqujo.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , Tom Tromey , Sean Whitton , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Kevin, On 07/08/2024 17:25, Kévin Le Gouguec wrote: > Heya, > > Have spent cycles on this on-and-off these past few months; finally have > something worth discussing, I think 🤞 > > To recap where we stand, AFAIU: the reported vc-dir bug has been fixed > (in time for the emacs-30 branch), but the changes could feel intrusive, > since a new vc-dir header was added ("Tracking") that some users may not > care for. I haven't looked at the patch in detail, but FWIW the new header feels like a minor enough detail to not be annoying (or even noticeable) when you don't want it, but it's good to have when you do need that info. This is my impression after having that feature around for a few months since it's been introduced anyway. Just a data point. Not to imply that the code couldn't be improved, or that the new option can't be useful. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 20 02:17:30 2024 Received: (at 68183) by debbugs.gnu.org; 20 Aug 2024 06:17:30 +0000 Received: from localhost ([127.0.0.1]:59682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgIBO-00079T-9L for submit@debbugs.gnu.org; Tue, 20 Aug 2024 02:17:30 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:60498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgIBL-00079E-TL for 68183@debbugs.gnu.org; Tue, 20 Aug 2024 02:17:28 -0400 Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-42ab880b73eso2310875e9.0 for <68183@debbugs.gnu.org>; Mon, 19 Aug 2024 23:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724134539; x=1724739339; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jnnSegbFGPFclSA3A2H+HQp2yHnUdhcMuatMfyWElx8=; b=eC0sjIWTH6YoDS+OVwLr0PfvYW7QndJGgRYCMfNGxL/zRhOKdPPmCYTfiu/CjOxCI0 Hvh01iqw13zkrcUq7MHcwHyJL8THfNKY1Gy+pkzkdlFlZTQOVdNPAorPLwuAglTDFYTA GvvmqV6dPvxblyQmmCax364LxiGB3+NjjfUBg2n7lADSiV2HIaScA+nKh6NQX0j+29bP nNEwSMDXDWADQS6qynsmg979BQK23qv//4r3U46VQ1H9YiWAPeEv5pABrGriLOxpPbjo nPRHjj/j+MLNOTEFsczlrfIDFwiaqB0qxGRCPQlMA34J8+faYYNoDbhC0sM9sjgdgqlA +j2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724134539; x=1724739339; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jnnSegbFGPFclSA3A2H+HQp2yHnUdhcMuatMfyWElx8=; b=ESWX8dYfAnNlQcbl8LLGjVTLPLt4oqH5m66SPhzpyXEGVmlvI+7bCdxAa01dWiKXQv paOb5/mzcuzV9F0g3wGozf60tBR12VCkYs+eSxh6k5Z52k7oIuJEJucUFAUveOKdBCoM xi5dtqSeJWtRbSCbGvY4jTgtVxWAcf18dUNq4DbS7Wnu0sMOGL8ynft8Ld4d/hAvRQV+ JNNiiJqW2xE2oF00t+62J5ZnBNeOPXqQTiCrasiUjzIJDEnuFJLUi1/monThBZAHd0dF iC3cXZimNJi6OZDdDNgfX6esZV7QLuY/Iqq28SLT5P5d5tzwiAvbuvZdh9g9q8RMLf/Q jmtw== X-Gm-Message-State: AOJu0YygRvUsNB81E8VwVBwGY4CDBse3DPJmLmhRbjp2FeoQgIEv0bFr AFal6VQrXrV9mEN9MYoFAEjXWgZX1uYTXvaLaAyeGQOIAUeqoQ9B X-Google-Smtp-Source: AGHT+IFcp1/DkTBPllVPjY9QRYr0CLncwZfHYrI+gDNqm0pu36ZXrqjgosNd3RYn6DFHO34SW4MrxQ== X-Received: by 2002:a05:600c:4712:b0:426:6c70:dd9c with SMTP id 5b1f17b1804b1-429ed7f9179mr96011015e9.31.1724134539027; Mon, 19 Aug 2024 23:15:39 -0700 (PDT) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed65072asm130031185e9.13.2024.08.19.23.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 23:15:38 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Dmitry Gutov Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> (Dmitry Gutov's message of "Tue, 13 Aug 2024 04:32:40 +0300") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> Date: Tue, 20 Aug 2024 08:15:37 +0200 Message-ID: <877ccbhg8m.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Sean Whitton , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > Hi Kevin, > > On 07/08/2024 17:25, K=C3=A9vin Le Gouguec wrote: >> Heya, >> Have spent cycles on this on-and-off these past few months; finally have >> something worth discussing, I think =F0=9F=A4=9E >> To recap where we stand, AFAIU: the reported vc-dir bug has been fixed >> (in time for the emacs-30 branch), but the changes could feel intrusive, >> since a new vc-dir header was added ("Tracking") that some users may not >> care for. > > I haven't looked at the patch in detail, but FWIW the new header feels li= ke a minor enough detail to not be annoying (or even noticeable) when you d= on't want it, but it's good to have when you do need that info. > > This is my impression after having that feature around for a few months s= ince it's been introduced anyway. > > Just a data point. Not to imply that the code couldn't be improved, or th= at the new option can't be useful. Thanks for weighing in. Since I am not a frequent vc-dir user, my disposition would then be to avoid committing to sophisticated user options until there is demand for it. So, at this stage, ISTM: * We could apply [patch 1] (new tests) on emacs-30. * I should draft a NEWS entry for the new header, for emacs-30. * We could apply [patch 2] (refactoring; modulo the considerations re. vc-git--cmds-in-progress discussed with Sean) on master, if we feel like it makes vc-git-dir-extra-headers easier to work with. [patch 1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68183;filename= =3D0001-Test-more-vc-dir-scenarios-with-Git-bug-68183.patch;msg=3D41;att=3D1 [patch 2]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68183;filename= =3D0002-Split-vc-git-dir-extra-headers-into-more-manageable-.patch;msg=3D41= ;att=3D2 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 20 08:16:53 2024 Received: (at 68183) by debbugs.gnu.org; 20 Aug 2024 12:16:53 +0000 Received: from localhost ([127.0.0.1]:60007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgNnA-00005L-FD for submit@debbugs.gnu.org; Tue, 20 Aug 2024 08:16:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgNn5-00004t-QI for 68183@debbugs.gnu.org; Tue, 20 Aug 2024 08:16:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgNmH-0004tU-SY; Tue, 20 Aug 2024 08:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=59jICbsjx7eoc+bx4SCmDLbZu3xK/hbf0KjXy4dhdkg=; b=VnWO6YlShhlEhANU+gQG /DDBNzRMTUO4uFQZsd+7hEYQhuHHd1ViT3XauuhrvW3NAJjQ4m1Cjv6A/U4NnEbT8kldHv77JsuD9 aXD8Uom2tL/9Msv3G6wQmh7XcK2pf3bcr38aQijmW9hV5j7cNTC7XJXOeAeza6qbJ5XJqKnJP/hJI 3QsvyAnr+gPMBRPoJel13YCj8hw30tGFwM+HH0L5nG94X2FxsP9VaTqm1X4YXRIEOe29CZa4Z0cs3 +32T5qh2642BPNep8mQhR+2Zwu1ronN/0RAoZbld/ZigXNj9zBCF2UqKAyMMa9pIeMpywAXUuhPIP brbqcj7OF7gaOA==; Date: Tue, 20 Aug 2024 15:15:49 +0300 Message-Id: <86frqzwft6.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec In-Reply-To: <877ccbhg8m.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Tue, 20 Aug 2024 08:15:37 +0200) Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68183 Cc: dmitry@gutov.dev, 68183@debbugs.gnu.org, tom@tromey.com, spwhitton@spwhitton.name, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Kévin Le Gouguec > Cc: 68183@debbugs.gnu.org, Eli Zaretskii , Tom Tromey > , Juri Linkov , Sean Whitton > > Date: Tue, 20 Aug 2024 08:15:37 +0200 > > Dmitry Gutov writes: > > > Hi Kevin, > > > > On 07/08/2024 17:25, Kévin Le Gouguec wrote: > >> Heya, > >> Have spent cycles on this on-and-off these past few months; finally have > >> something worth discussing, I think 🤞 > >> To recap where we stand, AFAIU: the reported vc-dir bug has been fixed > >> (in time for the emacs-30 branch), but the changes could feel intrusive, > >> since a new vc-dir header was added ("Tracking") that some users may not > >> care for. > > > > I haven't looked at the patch in detail, but FWIW the new header feels like a minor enough detail to not be annoying (or even noticeable) when you don't want it, but it's good to have when you do need that info. > > > > This is my impression after having that feature around for a few months since it's been introduced anyway. > > > > Just a data point. Not to imply that the code couldn't be improved, or that the new option can't be useful. > > Thanks for weighing in. Since I am not a frequent vc-dir user, my > disposition would then be to avoid committing to sophisticated user > options until there is demand for it. > > So, at this stage, ISTM: > > * We could apply [patch 1] (new tests) on emacs-30. > > * I should draft a NEWS entry for the new header, for emacs-30. > > * We could apply [patch 2] (refactoring; modulo the considerations > re. vc-git--cmds-in-progress discussed with Sean) on master, if we > feel like it makes vc-git-dir-extra-headers easier to work with. > > > [patch 1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68183;filename=0001-Test-more-vc-dir-scenarios-with-Git-bug-68183.patch;msg=41;att=1 > > [patch 2]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68183;filename=0002-Split-vc-git-dir-extra-headers-into-more-manageable-.patch;msg=41;att=2 A NEWS entry is probably OK, though I'd like to see it first. As for adding tests, I think they should go to master. There's no purpose in adding them to the release branch, which is basically frozen to code changes except bugfixes. Since we merge code to master routinely, any regression that happens on the branch will soon enough land on master and will be detected there. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 20 20:43:09 2024 Received: (at 68183) by debbugs.gnu.org; 21 Aug 2024 00:43:09 +0000 Received: from localhost ([127.0.0.1]:34656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgZRM-0004Mw-Tu for submit@debbugs.gnu.org; Tue, 20 Aug 2024 20:43:09 -0400 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]:32905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgZRK-0004MO-36 for 68183@debbugs.gnu.org; Tue, 20 Aug 2024 20:43:07 -0400 Received: from phl-compute-03.internal (phl-compute-03.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id EE56013875F8; Tue, 20 Aug 2024 20:42:16 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 20 Aug 2024 20:42:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1724200936; x=1724287336; bh=C+O7vyOoZrpSoS3uFStuHKvaCQvT0W0IiqNRHzzY8dc=; b= h+8q4Zr/ZdUems0wR6Yq3yKIEFpt78q8ZUu+xNN0pUE7lUVJONQkKZc3fLgwgzQl CMrQawfR0LuGG5MYqCQPWL2HySOSodCqdSU2jM0PrZHXqwCycjTEnjjLPyvHYXbh /c4h3nij4inqWHiJHVxvI4+uUHPALVSuw+1GsbimUNyDs+5T0hrJmlsqEYl2Mn1R G05iHwh29V3xK80XH/Pxw9hBNDunQD67L40wATEVeYHZR4x+Sa5peaVqX7xbpy0/ aB3DyKEij8MeFoc57UO6beNmhhbSB4vspOfa+W+KbnhmYw1sPQ+38STuH694S2rG TqV9adj0nsvdVw9pXrmwKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1724200936; x= 1724287336; bh=C+O7vyOoZrpSoS3uFStuHKvaCQvT0W0IiqNRHzzY8dc=; b=H +j5QUSf0a+vSGfTqQHhDpfq0WdvoZ+HjQNpj+93iF7NjbXnj7GZ4iYkQnwZfs6Rb Q9z8aXuONnGPbYkVcNaHVmiy7A0+je8TDM5JTSbeJi+3GUy+aafnZ3BeQNHFbInH EFexIe0ZWYeWPYzjkzwk9flhvM80TS+N23HbU71gleuJYQo2mzgr6tm85JAwR0mR zeFFuH3oaZmGpTK4JWeGQTXpbTeTYSOEzhqw3JjORb5uupBL+vNps5DA1J08nLIy /nO4Jo8c2MZcg518viskxtzSZfj3AOMkwSMgfXnnD/fRfPel40W6ozYoBE3OE9ke fWoE8J1a1k9Og25QpaKBg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddujedgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveeg tedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehkvghvihhnrdhlvghgohhugh huvggtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepieekudekfeesuggvsggsuhhgshdr ghhnuhdrohhrghdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhope htohhmsehtrhhomhgvhidrtghomhdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhn vghtpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Aug 2024 20:42:14 -0400 (EDT) Message-ID: Date: Wed, 21 Aug 2024 03:42:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <877ccbhg8m.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Sean Whitton , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 20/08/2024 09:15, Kévin Le Gouguec wrote: > Thanks for weighing in. Since I am not a frequent vc-dir user, my > disposition would then be to avoid committing to sophisticated user > options until there is demand for it. We're in agreement then. > So, at this stage, ISTM: > > * We could apply [patch 1] (new tests) on emacs-30. > > * I should draft a NEWS entry for the new header, for emacs-30. > > * We could apply [patch 2] (refactoring; modulo the considerations > re. vc-git--cmds-in-progress discussed with Sean) on master, if we > feel like it makes vc-git-dir-extra-headers easier to work with. Thanks! NEWS for emacs-30 sounds good, and I've pushed the other two changes (tests and refactoring) to the master branch. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 20 21:41:53 2024 Received: (at 68183) by debbugs.gnu.org; 21 Aug 2024 01:41:53 +0000 Received: from localhost ([127.0.0.1]:34689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgaM9-0006RJ-PE for submit@debbugs.gnu.org; Tue, 20 Aug 2024 21:41:53 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:35214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgaM5-0006Qw-1t for 68183@debbugs.gnu.org; Tue, 20 Aug 2024 21:41:49 -0400 DKIM-Signature: a=rsa-sha256; b=kWWi7Q+AFI7GzVuZPQifLPQtlxBkChsUWPUkuQJ5tsg2ZXQ/+Xg9R/Ycu8aRFYAi4zF0Vh5qXFz9If4YmHQczeW2uS4MDZBpSW4S4OYNzwdUsTXuwJ3vTtRVKamzddB3p+3y+qggNPxs3JUfCgGnv9LemBICgx1jAg5UuwSXhgeaXSJBjk7ZMgIf6COUOL4XEKs9hQQPQL6dbXJAzK69YsRTWQd7BQ02KDVVjD72k9e9kYDkkPc3qQ9EGbKBxyxHuU+DhrKFZh1T7XBMhOgoNyVqY6Hq/AttqzNmEt8kq1lCUErYFrnkfz6Rf7zCM77w3dk8BJxMzpTLwHRSYBb0nA==; s=purelymail2; d=spwhitton.name; v=1; bh=HG3bdNQt0ykcHeYKRSYp9FCqHA10zW3QMNGnkbNYH9U=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=x5RftkgEKRkBLMq7FIvh2+GJsCV2wOJq2tfnaTjasI/SvTN4XuUnNHXXLti4vdZTqyEy2UyKHoiYW3zZv8UjvEn2DAUf0OoyYNICBJO/c3EzlNCJwjy6o6Z/tzl9qN5P3JdZZUPP1IrkCKiqCWU/8UyMAqmoP4kS7WVihzi2az1Mq1YIPxe9sNfpHeeqmbpHlhUynMu9MV0ozacBqYu7bTEaXiPf4RoMPsNRKwOda2eLuAi904MuRjJimdvpqvDUBVxnWKYNqsFsFlzIXs84XiR+KAhvXgODuVOHhmBWvXRzKN9b1+pEDnUPFa+aJ9es59JSZNAZUl6eaZK2B4ivBQ==; s=purelymail2; d=purelymail.com; v=1; bh=HG3bdNQt0ykcHeYKRSYp9FCqHA10zW3QMNGnkbNYH9U=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 68183@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 196884318; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 21 Aug 2024 01:40:55 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id A63197EFB09; Wed, 21 Aug 2024 09:40:52 +0800 (CST) From: Sean Whitton To: Dmitry Gutov Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: (Dmitry Gutov's message of "Wed, 21 Aug 2024 03:42:13 +0300") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> Date: Wed, 21 Aug 2024 09:40:52 +0800 Message-ID: <87msl6tzyz.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Juri Linkov , Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , =?utf-8?Q?K=C3=A9vin?= Le Gouguec X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Wed 21 Aug 2024 at 03:42am +03, Dmitry Gutov wrote: > NEWS for emacs-30 sounds good, and I've pushed the other two changes (tests > and refactoring) to the master branch. Hang on, I think Kevin hadn't incorporated my requested changes into that version :) Kevin, could you provide a follow-up patch, please? Thanks. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 21 03:08:09 2024 Received: (at 68183) by debbugs.gnu.org; 21 Aug 2024 07:08:09 +0000 Received: from localhost ([127.0.0.1]:34776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgfRw-0007yU-RO for submit@debbugs.gnu.org; Wed, 21 Aug 2024 03:08:09 -0400 Received: from mail-lj1-f177.google.com ([209.85.208.177]:41976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgfRt-0007xr-8p for 68183@debbugs.gnu.org; Wed, 21 Aug 2024 03:08:06 -0400 Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2f01db9f419so5784131fa.3 for <68183@debbugs.gnu.org>; Wed, 21 Aug 2024 00:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724223975; x=1724828775; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=uUfAH+qkuwG1EG7KgVBu/w5hrAb6Bxa0jOuiptRV0yA=; b=jnqqh6Uoulz96mJW9olYAr0qqYJhBNnwTHCBqP29OyysI18oe/UxYgpzux7+nty7KT 9eAlMbd/Cyp12xylGxNBXRoIOYA0R1VpCEAmeKzVBszPOQzDevFlzIgvocMQuLmjZP2S rq3L1sST1IzkcdDTJbxEXB/zJYI+xykjiEjr2SFLHYsKAHAyFAc6X93ySsc6mU+nN96/ qi+Cjl9K/fcKC2FYEucQv9Zoo7I8g8uI40EQyLG9DTANEHuz9eDLqP9yGtS/J6PJvefd 2eM0FHCpG/2FXU9N8OFiNwxNYqQofjkvTmMgnD7qOTe/CMxOAZZj9yWBlKiiW/YpGlgO WTxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724223975; x=1724828775; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uUfAH+qkuwG1EG7KgVBu/w5hrAb6Bxa0jOuiptRV0yA=; b=JBsZPHAXXCmCBORI85wox2JuScxQ88ANFDSC3rmP8V0YNS7iKVFD9XDoB+PLGRyvW7 +yPbT2BQ7cJzRPeJtZ5l98Us6ivSFlPtPfNqX6lrIAczj/onwhMvvg99yaqZowPb4PRL AMcb19S+2A0mU2bMOg/EUb6hRYmQm5RQs1mxOz7tzmuyDrvcIYuWjZuPIRNlFkvBLTj2 07w5eI7CCqS7ReNj5YJ02ierFC5msxNXzZt+YI6W4y7v/O/N7BY4Bow2B521TV5Yz5/h d/cLxo5XV+P9nGq0R3fsKSfRBaLXQjQdrv4hw5y92a+YWCw/GnssZRrqjkRpWMLq6UVi YE7g== X-Forwarded-Encrypted: i=1; AJvYcCWuE5qSbJs732FhPdJLk3c/B3qxGmjRn/uU3GuHXhweKYSvaF+wA9+h6VQ+/HSv3+99Nsc4rA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz0kuYj9WsYArvIFQ8boQOaiOMB2iYNo39wpf9z08D2lhDQzNeu kWodOKrY0h2W2X4CEusSqCntc1kqqr/1WK0SoRKXn3Z49yiVCGln X-Google-Smtp-Source: AGHT+IFLY/lJd7WOvRuwUEBXF16lnW+e7Qq0cWP84fbabf+OZzGX9RwrCnlO5uvsFD5W8BCWjSwjTQ== X-Received: by 2002:a05:651c:221b:b0:2ef:315c:67e1 with SMTP id 38308e7fff4ca-2f3f89381camr5860871fa.4.1724223974497; Wed, 21 Aug 2024 00:06:14 -0700 (PDT) Received: from kevinlegouguec.net (kevinlegouguec.net. [151.80.149.237]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a83838c6c12sm867708266b.14.2024.08.21.00.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 00:06:12 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Sean Whitton Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <87msl6tzyz.fsf@melete.silentflame.com> Date: Wed, 21 Aug 2024 09:05:50 +0200 In-Reply-To: <87msl6tzyz.fsf@melete.silentflame.com> (Sean Whitton's message of "Wed, 21 Aug 2024 09:40:52 +0800") Message-ID: <86wmkaqrsh.fsf@kevinlegouguec.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sean Whitton writes: > Hello, > > On Wed 21 Aug 2024 at 03:42am +03, Dmitry Gutov wrote: > >> NEWS for emacs-30 sounds good,=20 (ACK'ing Eli's request to submit here for review before pushing =F0=9F=91= =8C) >> and I've pushed the other two changes (te= sts >> and refactoring) to the master branch. (Thanks!) > Hang on, I think Kevin hadn't incorporated my requested changes into > that version :) (Right, I've been less reactive than ideal these past few days, apologies for that) > Kevin, could you provide a follow-up patch, please? Thanks. Something like the attached, right? Tested manually with a rebase. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Restore-vc-git-helper-function-bug-68183.patch >From beb4fd8874fb4c03ce2b8b789bcb7a4b7ee411b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Wed, 21 Aug 2024 08:45:00 +0200 Subject: [PATCH] Restore vc-git helper function (bug#68183) * lisp/vc/vc-git.el (vc-git--cmds-in-progress): Restore; it was removed in a previous refactoring patch, but we may still find some use for it. (vc-git-dir--in-progress-headers): Use it. --- lisp/vc/vc-git.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 4d631c7e032..dedf6fdd219 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -748,8 +748,8 @@ or an empty string if none." (and tracking (fmt "Tracking" tracking)) (and remote-url (fmt "Remote" remote-url))))))) -(defun vc-git-dir--in-progress-headers () - "Return headers for Git commands in progress in this worktree." +(defun vc-git--cmds-in-progress () + "Return a list of Git commands in progress in this worktree." (let ((gitdir (vc-git--git-path)) cmds) ;; See contrib/completion/git-prompt.sh in git.git. @@ -765,6 +765,11 @@ or an empty string if none." (push 'merge cmds)) (when (file-exists-p (expand-file-name "BISECT_START" gitdir)) (push 'bisect cmds)) + cmds)) + +(defun vc-git-dir--in-progress-headers () + "Return headers for Git commands in progress in this worktree." + (let ((cmds (vc-git--cmds-in-progress))) (cl-flet ((fmt (cmd name) (when (memq cmd cmds) ;; For now just a heading, key bindings can be added -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 21 04:00:50 2024 Received: (at 68183) by debbugs.gnu.org; 21 Aug 2024 08:00:50 +0000 Received: from localhost ([127.0.0.1]:34845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sggGv-00019Q-KP for submit@debbugs.gnu.org; Wed, 21 Aug 2024 04:00:50 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:41638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sggGs-000197-Pl for 68183@debbugs.gnu.org; Wed, 21 Aug 2024 04:00:48 -0400 DKIM-Signature: a=rsa-sha256; b=CWtwoVg/UKKrITi+XqbJQMFmh8RVwKCqkFGmDkr04OB+2B3pIagg9cHFALzynmwCzyXQHX2b59sQCxkSPEISy2AiNtF6dZOVF0hyAexf6z1NBgLtw/JmdUzj+yQRlArbwaowf/Hb6GwyaUUKejEioylXd/MwTa/TxxEjCULM/V/sJKwgm7F+86ETcchr97mbhot/Sr3olPbN0U3XyK3CtUo2Um+ksj1XDiKwVRHEt4M6KSA2jcf8Regz9kRCmzjmT2qdnJBp6+qkf45NT67EKXh4iag1hnZhBXI8Yju1zJwodX38Xj5C3zBCwiLLUBRPkw/S//4e9ZUWZFp9SyELrg==; s=purelymail2; d=spwhitton.name; v=1; bh=1ksS9FL4x6ixY7Qsk08qyAyVMDbT64uEnxlcL1RPLrg=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=T7uV+0Ic+1hGfuXk8SFUTAcRumUIgUeb6JYsht2Afjrsf8a3lC7yHN2i7w07xuL9cy49zCX8KXo0Wb5dJRDWwoDNvQ1zJzG//TgkHnPxg2lBGtIgBF4R30GywnI4MemyzqnwPIwpbd2vYzGMBTdBm44fNXmGJRBE+dIy1XSbiyInBVXfKe2Cm71sI1vmOhine5WmDNUgD83gWEzYyWVnLav3nkmZeZax2fxjpLf4XJpQcJmFG/iavPPa7yd4YR8fCrk1785adRRRxn3QSagubAKSTRRBxejKJR0GwNzrDwNTaIYF96g2/oWXbxdwAvK0GL1pbKndvGcbXYLo3i9vcQ==; s=purelymail2; d=purelymail.com; v=1; bh=1ksS9FL4x6ixY7Qsk08qyAyVMDbT64uEnxlcL1RPLrg=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 68183@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 2112694177; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 21 Aug 2024 07:59:49 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 32ADF7EFCA9; Wed, 21 Aug 2024 15:59:44 +0800 (CST) From: Sean Whitton To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <86wmkaqrsh.fsf@kevinlegouguec.net> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Wed, 21 Aug 2024 09:05:50 +0200") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <87msl6tzyz.fsf@melete.silentflame.com> <86wmkaqrsh.fsf@kevinlegouguec.net> Date: Wed, 21 Aug 2024 15:59:44 +0800 Message-ID: <87cym2paq7.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: Dmitry Gutov , Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Wed 21 Aug 2024 at 09:05am +02, K=C3=A9vin Le Gouguec wrote: > (Right, I've been less reactive than ideal these past few days, > apologies for that) No, I think it was that Dmitry misunderstood you and thought that was the final version of the patch. >> Kevin, could you provide a follow-up patch, please? Thanks. > > Something like the attached, right? Tested manually with a rebase. Thanks -- pushed. (I did s/find some use/find use/ in your log message because it seemed more(?) grammatical. Now I read it again, I'm not sure that is true. I hope this is okay with you. It's a very small change.) --=20 Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 21 08:30:55 2024 Received: (at 68183) by debbugs.gnu.org; 21 Aug 2024 12:30:55 +0000 Received: from localhost ([127.0.0.1]:35125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgkUJ-000122-DU for submit@debbugs.gnu.org; Wed, 21 Aug 2024 08:30:55 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]:32803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgkUH-00011j-2J for 68183@debbugs.gnu.org; Wed, 21 Aug 2024 08:30:54 -0400 Received: from phl-compute-01.internal (phl-compute-01.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 2B5E0138FF69; Wed, 21 Aug 2024 08:30:03 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 21 Aug 2024 08:30:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1724243403; x=1724329803; bh=4UEOMxdqBi04sYFfc5SsPLAXlKxuPI7V4+q51rr4ukk=; b= luJUESqQQ0JOAUB8p2peVnJGl05Bw3m0x1KipDhgH2q5qK8qcwXIStzlc8ySPn7q LCq06wIE28XN5gtVKoif8Sm5BWg2NpfOZCBaCZuAtrghrHiV/wLT7xQRYjcEq3wP yxSno8w1SRehghxAow+55qxlwHAPcMY83e4KcEqrNNO86ah4CFV51g5GfjlG6HrU QDc+SrvWUgzIPZLkyQW1CjDb8FRmDWuS1ZSjhKlDSXP3908pcKFcwrdQHyhfCyLV +kMZyjH/LTtZfvkIbC5JtsOHEAkxTsXLjUikdb0Uajrd6zFDL5Cv+awqrwLhiSk/ PcFaVLx87oj6oaoQk0a/aA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1724243403; x= 1724329803; bh=4UEOMxdqBi04sYFfc5SsPLAXlKxuPI7V4+q51rr4ukk=; b=I Vr+jOP3EpuzZoHHUj87NcIph9XABjBIiYR3EDY7LwHzsSDzA6GNPpK50Vmooggod wqcgHLydXuWM2zquST0xWTXIQCl0wbHlNGD/et5vbaDzowIJ0XvqnB3MXSeqsNEt gD4FqT5a0w/reWOxl2cVc13MPsaldj9ewkvBwRxnIR1fbt/8G0PZY64zySsSUtGl 1RDVebP6SQwjtaltHLucgQdKnGPNPaTcPJIe9WKuTiq4VdigXamgdpxcUZDh/jLU c7s7oENufdg/sdjUjKm33/xDqxh2pDiwC4qoTOygNPGwRiCFHMMaqXDQNonH1RTN sSztOVnkOqSeGGR00E30w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddukedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveeg tedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsph ifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopehkvghvihhnrdhlvghgohhughhuvggt sehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpth htohepieekudekfeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehtohhm sehtrhhomhgvhidrtghomhdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvght X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Aug 2024 08:30:00 -0400 (EDT) Message-ID: Date: Wed, 21 Aug 2024 15:29:58 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out To: Sean Whitton , =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <87msl6tzyz.fsf@melete.silentflame.com> <86wmkaqrsh.fsf@kevinlegouguec.net> <87cym2paq7.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87cym2paq7.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68183 Cc: Eli Zaretskii , 68183@debbugs.gnu.org, Tom Tromey , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 21/08/2024 10:59, Sean Whitton wrote: > Hello, > > On Wed 21 Aug 2024 at 09:05am +02, Kévin Le Gouguec wrote: > >> (Right, I've been less reactive than ideal these past few days, >> apologies for that) > No, I think it was that Dmitry misunderstood you and thought that was > the final version of the patch. > >>> Kevin, could you provide a follow-up patch, please? Thanks. >> Something like the attached, right? Tested manually with a rebase. > Thanks -- pushed. > > (I did s/find some use/find use/ in your log message because it seemed > more(?) grammatical. Now I read it again, I'm not sure that is true. > I hope this is okay with you. It's a very small change.) Thank you both. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 03:17:04 2024 Received: (at 68183) by debbugs.gnu.org; 22 Aug 2024 07:17:04 +0000 Received: from localhost ([127.0.0.1]:36614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh247-0000AV-P2 for submit@debbugs.gnu.org; Thu, 22 Aug 2024 03:17:04 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:39668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh243-00009j-Nl for 68183@debbugs.gnu.org; Thu, 22 Aug 2024 03:17:02 -0400 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4281da2cdaeso1033065e9.2 for <68183@debbugs.gnu.org>; Thu, 22 Aug 2024 00:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724310908; x=1724915708; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Shuzf/6MEpQt3Ef9xmHlZB0S/h6rtR3UrZreE6AczX4=; b=CZtguw+GQ2WDOGK/vNKY1dOhViyKUah5ZrJ+kyqdpR5umhvF2srF0fCWt/Zmf+wWQP eFS0ZBnbJ8sHQ9wuQX3uC2x+QiOM8hw2HJdYYOzp+SUltW4SzY4f0sqlG1yNjqT2VF28 JVumlk51SGxOiml/dKIulUH05VPYu7yjlpFeiwu8DF/0yZyh+5zjlGOEdcwQdahDznpr ZdOBlRFbZ3NGv7UkQgRLEQS+JGY3dWoW68B+BFfukKJ2nidNODvsBZG06vsVTiP609RK /NKHTnsa1GpfH239jVWd8/OrOcRkyStRdWysbO4POLDqYOTnWkQRC6ylWDieDU7Xg3Cq ufbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724310908; x=1724915708; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Shuzf/6MEpQt3Ef9xmHlZB0S/h6rtR3UrZreE6AczX4=; b=hsmgrGGr/Ko1hGkadclgapwrs+qLqM/m9MycbT2zD0RKyNGCUBPkvGiLHVeRiMF7iN olRWitCji87vRC1LpGh5DLwWG4jcjvhxUzNgL7m8xI3OhKkznTPwY5qhziiMWbxxYZaJ WBpkFX/4rvVdr16XCGuQ2wescKVJfU1+1nXX+RWOuHVWkrXSNi1ftAsQidj9SdGrOId3 MgfIcmmyEKzW8XqJZFWDbUuPbUbLmpIoHC9zqcN6u5JMHqyrDoVq8j0tueveEtrx8dSJ u8ozRmURi3L4bOq4aCCufDri07dTkCyOQi99fa9u4Pg2yXSNX+1P4ym8JZds+mAAdlh8 sjcw== X-Forwarded-Encrypted: i=1; AJvYcCUZL7V8qSBWhcE5qIIj8hTenB/hH+MJ412XFAIsBVojUEG1yehROraKEdAfl4gQYuA9p9F62w==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx9Un9YIMC8XCVbM8qVzacdnBAtRLIEZMZ/wC+v/RsKdYpGq4Nw /3C1tnHueHlxT4rVxfetAay8L/F3MFgzoLzIVL3xJZ8MCYkR18K1 X-Google-Smtp-Source: AGHT+IHaR9xuNpttvTWf3A/nmA2TByS4+9smUDueGhoRHnA7d61QSN4fFeAheR7a2I7dYF4Ip2OH3A== X-Received: by 2002:a05:6000:1549:b0:360:872b:7e03 with SMTP id ffacd0b85a97d-372fd4d4357mr1727808f8f.0.1724310908010; Thu, 22 Aug 2024 00:15:08 -0700 (PDT) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37308264ca6sm898734f8f.101.2024.08.22.00.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 00:15:07 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <86frqzwft6.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Aug 2024 15:15:49 +0300") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <86frqzwft6.fsf@gnu.org> Date: Thu, 22 Aug 2024 09:15:06 +0200 Message-ID: <87msl5av0l.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68183 Cc: dmitry@gutov.dev, juri@linkov.net, 68183@debbugs.gnu.org, tom@tromey.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: > A NEWS entry is probably OK, though I'd like to see it first. Please find a draft attached. Lifted the "upstream branch" definition from the horse's mouth, i.e. gitglossary(7), adjusting for VC relevance, i.e. "where vc-pull fetches". (Agonized a bit over how to typeset "VC-dir buffers"; went with that spelling because a bunch of vc-dir.el deffaces use "VC-dir". *5 seconds later* But I now realize etc/NEWSes also use "VC Dired", "VC-dired", "vc-dir for ", "*vc-dir*", "VC directory mode", vc-dir-mode, and "VC directory buffer", so maybe I oughtn't worry so much? *5 seconds later* =F0=9F=92=A1 Ah, well, guess I could follow The Fine Manual's nomenclature? Changed to "VC Directory buffers", per '(emacs) VC Directory Mode'. Kept the shorthand for the ChangeLog message for brevity) In another subthread, Sean Whitton writes: > (I did s/find some use/find use/ in your log message because it seemed > more(?) grammatical. Now I read it again, I'm not sure that is true. > I hope this is okay with you. It's a very small change.) (Can't attest to grammaticality, but AFAICT you ditched a weasel word and reduced noise, and that's quite OK, thanks!) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-etc-NEWS-Announce-VC-dir-Tracking-header.-bug-68183.patch >From 6c918ded7ebded709550dd87ce3e0e1688c7446a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Thu, 22 Aug 2024 08:34:03 +0200 Subject: [PATCH] ; * etc/NEWS: Announce VC-dir "Tracking" header. (bug#68183) --- etc/NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 98eca7b8061..1fb23554f59 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1017,6 +1017,16 @@ behavior, set user option 'vc-annotate-use-short-revision' to nil. *** New user option 'vc-git-file-name-changes-switches'. It allows tweaking the thresholds for rename and copy detection. +--- +*** VC Directory buffers now display the upstream branch in Git repositories. +The "upstream branch" is the branch 'vc-pull' fetches changes from by +default. In Git terms, the upstream branch of branch B is determined by +configuration variables branch.B.remote and branch.B.merge. + +When these configuration variables are set for the current branch, the +VC Directory buffer will show the corresponding upstream branch under +the "Tracking" header. + ** Diff mode --- -- 2.46.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 08:47:58 2024 Received: (at 68183) by debbugs.gnu.org; 22 Aug 2024 12:47:58 +0000 Received: from localhost ([127.0.0.1]:37033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh7EM-00013K-G1 for submit@debbugs.gnu.org; Thu, 22 Aug 2024 08:47:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh7EK-000133-5W for 68183@debbugs.gnu.org; Thu, 22 Aug 2024 08:47:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sh7DU-0000O4-03; Thu, 22 Aug 2024 08:47:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=B4C7GS/qehQIjLJj0iTDeKnhJc1EUMPFIaw1AOl0ggs=; b=fhlCM9c+T9gDRDYdAs4A VEvjc5gDKIIaY14rd/2cjXMAYP0c61KFjsUdJAjKJzlzdmYDGt+SWeBqSJZA2IqOp+nkmgNByI1Va uhQTJlLyTs4rR1qnd0GDxy7F6bsDPvm1YHcqr1W9Hzlo95JLkS78qGZYKM9R9cNITqQjjoebGEbXD 69Tua/fMFg0fBIsPRZGea33YRYf2sfjYZ1PxDZL0b6mgRPfeSvMnTsv//RexE/Qmfdxx7iQkBiP/S qYUJGyCyAmkkDrolPA8BEKGLI8RwyTX0687LSLG1Oc9lIZ4Q4GzKWMVKWZ7Kdxh76uRchhxG1onp4 7ErSbMzqIKy4/Q==; Date: Thu, 22 Aug 2024 15:46:56 +0300 Message-Id: <86r0agsp1b.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec In-Reply-To: <87msl5av0l.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Thu, 22 Aug 2024 09:15:06 +0200) Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <86frqzwft6.fsf@gnu.org> <87msl5av0l.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68183 Cc: dmitry@gutov.dev, juri@linkov.net, 68183@debbugs.gnu.org, tom@tromey.com, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Kévin Le Gouguec > Cc: dmitry@gutov.dev, 68183@debbugs.gnu.org, tom@tromey.com, > spwhitton@spwhitton.name, juri@linkov.net > Date: Thu, 22 Aug 2024 09:15:06 +0200 > > +--- > +*** VC Directory buffers now display the upstream branch in Git repositories. > +The "upstream branch" is the branch 'vc-pull' fetches changes from by > +default. In Git terms, the upstream branch of branch B is determined by > +configuration variables branch.B.remote and branch.B.merge. That's okay, with the following nit: I find phrases like "the branch 'vc-pull' fetches changes from by default" hard to grasp. I prefer rephrasing to make the grammar simpler: The "upstream branch" is the branch from which 'vc-pull' fetches changes by default. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 11:38:34 2024 Received: (at 68183) by debbugs.gnu.org; 29 Aug 2024 15:38:34 +0000 Received: from localhost ([127.0.0.1]:51931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjhEI-0003VM-4h for submit@debbugs.gnu.org; Thu, 29 Aug 2024 11:38:34 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:38584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjhEG-0003V2-4Q for 68183@debbugs.gnu.org; Thu, 29 Aug 2024 11:38:32 -0400 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42baecbd4fbso1189675e9.2 for <68183@debbugs.gnu.org>; Thu, 29 Aug 2024 08:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724945791; x=1725550591; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=yPFlmnaLEEFGQt4Y5h37alfyPYLYeVAjfrilNTHD1RM=; b=KPtOTT68j35suVgTIp7J0IbreJuc7MykskOolaxwDdAhOGdYRLxxSCQO4Vh3d06lhw AEcv5VvSInZwSoMabcki7XtvA3PXm2K1BoSyXae+FEopUoOd1pe+gSW1j1nV9mo3KT4o yKA9Tq/qpKdWGJdWG3w7mZ8OGppjhkp+9UmTpWqy6I3XcaeXxumWqQSo+mKobGA70Dns NFq8BdN5sOvAkEqPFsp5yEU1bz3jo8WTl9riPGlXGNCi2RB3sTcyOltnvsL9cJDYe5Z0 2m4QcQ2Q+Mw3rGZS4wg+KcMoUXgB+3fizcl3aF3qCHfumgpHJcbewsHN4xYHlORVhOhe MmTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724945791; x=1725550591; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yPFlmnaLEEFGQt4Y5h37alfyPYLYeVAjfrilNTHD1RM=; b=SqRphB5lNtkGP3WVAdQUP05gXAG1Ff5HGxc5BPjMBC5PByLIsXCumb0QB4SHcp3M3Q ZR7KQGORJ6Ti4qnG9zlCva7vsiIFTGkPCET9fVNRlSX7ceb+7hStWCKY6+lw/napDKZN t6tM88cDunRvqp4RwB7YuJUZjrGKoBgqBiw6UCclGAPq1ae1Z0xBNk/ckNvBpcB19m0z FkCTL71ugOhJ52VWYeqzWGNz7ZAPJk8TnF0aqGjnVzT/Xw/vQRkrDENp8sA96t4T56Zl K1YNibH+WooEk5OhfYZGolemvGuvnv0UJPIZp6+IrTyT/CxmqdNT3O0bN11n719nlY0L dpOA== X-Forwarded-Encrypted: i=1; AJvYcCXx35RtzL0GaWbhWe1Jc3CBBYoK2rtju7dLYvRN4y9xb/ulK07gnQ6lLqvDHeyrCjkktL3YTw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxxehZOCIYSpFZ3eoIvhpqItOT9ITt90VH5+HUAkbHeePV8Aqea 0S+KWoVpJmAOyTtH6CQYVac/Lnymriw4RluObh7YDZ7J46DPRaG+CJF24nP3 X-Google-Smtp-Source: AGHT+IGGrSRNfipfouhSXNelNPxi/kOmlbq17p1oFaSLnu8mekCHTGio2cnZcA7+QFYsLR+2kGNthQ== X-Received: by 2002:a05:600c:4fd3:b0:428:f17:6baf with SMTP id 5b1f17b1804b1-42bb0221f87mr16635555e9.5.1724945790341; Thu, 29 Aug 2024 08:36:30 -0700 (PDT) Received: from hirondell ([80.80.188.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6deb273sm20884815e9.8.2024.08.29.08.36.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 08:36:29 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <86r0agsp1b.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Aug 2024 15:46:56 +0300") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <86frqzwft6.fsf@gnu.org> <87msl5av0l.fsf@gmail.com> <86r0agsp1b.fsf@gnu.org> Date: Thu, 29 Aug 2024 16:36:28 +0100 Message-ID: <87v7zjwdc3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> +--- >> +*** VC Directory buffers now display the upstream branch in Git repositories. >> +The "upstream branch" is the branch 'vc-pull' fetches changes from by >> +default. In Git terms, the upstr [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kevin.legouguec[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.46 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [80.80.188.36 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.46 listed in list.dnswl.org] X-Debbugs-Envelope-To: 68183 Cc: dmitry@gutov.dev, 68183@debbugs.gnu.org, tom@tromey.com, spwhitton@spwhitton.name, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> +--- >> +*** VC Directory buffers now display the upstream branch in Git repositories. >> +The "upstream branch" is the branch 'vc-pull' fetches changes from by >> +default. In Git terms, the upstr [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.46 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [80.80.188.36 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.46 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kevin.legouguec[at]gmail.com) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> +--- >> +*** VC Directory buffers now display the upstream branch in Git reposit= ories. >> +The "upstream branch" is the branch 'vc-pull' fetches changes from by >> +default. In Git terms, the upstream branch of branch B is determined by >> +configuration variables branch.B.remote and branch.B.merge. > > That's okay, with the following nit: I find phrases like "the branch > 'vc-pull' fetches changes from by default" hard to grasp. I prefer > rephrasing to make the grammar simpler: > > The "upstream branch" is the branch from which 'vc-pull' fetches > changes by default. ACK; got the attached at the tip of my emacs-30 branch, and my finger over the 'git push' button. Let me know if it's time to 'C-x v P'. (And mark this bug "done", since I believe this was the last loose end?) (Prefer asking since I let a week fly by, on the off chance that the release branch might have reached a "hands off =E2=9C=8B" stage) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-etc-NEWS-Announce-VC-dir-Tracking-header.-bug-68183.patch >From 39ae8a21b342acf7d60945db4d36dcabb52385e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Thu, 22 Aug 2024 08:34:03 +0200 Subject: [PATCH] ; * etc/NEWS: Announce VC-dir "Tracking" header. (bug#68183) --- etc/NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 98eca7b8061..9cf41188868 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1017,6 +1017,16 @@ behavior, set user option 'vc-annotate-use-short-revision' to nil. *** New user option 'vc-git-file-name-changes-switches'. It allows tweaking the thresholds for rename and copy detection. +--- +*** VC Directory buffers now display the upstream branch in Git repositories. +The "upstream branch" is the branch from which 'vc-pull' fetches changes +by default. In Git terms, the upstream branch of branch B is determined +by configuration variables branch.B.remote and branch.B.merge. + +When these configuration variables are set for the current branch, the +VC Directory buffer will show the corresponding upstream branch under +the "Tracking" header. + ** Diff mode --- -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 11:47:39 2024 Received: (at 68183) by debbugs.gnu.org; 29 Aug 2024 15:47:39 +0000 Received: from localhost ([127.0.0.1]:52010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjhN4-0003sH-QT for submit@debbugs.gnu.org; Thu, 29 Aug 2024 11:47:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjhN1-0003s0-Nq for 68183@debbugs.gnu.org; Thu, 29 Aug 2024 11:47:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjhM0-0001n8-Sl; Thu, 29 Aug 2024 11:46:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+gjCr/3HnwlctNX/FKV8BgJyCpBY9n9zu1/sjO91Xc4=; b=fDMmL11Syw3EQEfRQ4eC sz+DUio4gmsnxHo8wXihePjpV29p0sf59HMR63b0k6DuZQOvhjsxb5sDq/bj4y7RgaNAD6mot70O1 AJQcbj358zYCyhiAt4eW+hj2ZKGkTLIA3PnUHqcmo6G42etxaACfaaHxysRElV4qkBV3I6ce7/K0u kIEbdNYygLvwR2RNvZQjlNQohroQUHlceJzYzSifowRUr3PbA5mS0TTnx5Yu1wGnbeo+2FmKqqi4L IqEt1Wx8NsxeiOn4g1jeHNg4P3o5IffYGnB0xngFJmdcDuBGVtzATrl0Fjz2VNtWRacbnfVJ7smXO 49hgPnARHZPQWg==; Date: Thu, 29 Aug 2024 18:46:28 +0300 Message-Id: <868qwffi23.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec In-Reply-To: <87v7zjwdc3.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Thu, 29 Aug 2024 16:36:28 +0100) Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <86frqzwft6.fsf@gnu.org> <87msl5av0l.fsf@gmail.com> <86r0agsp1b.fsf@gnu.org> <87v7zjwdc3.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68183 Cc: dmitry@gutov.dev, 68183@debbugs.gnu.org, tom@tromey.com, spwhitton@spwhitton.name, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Kévin Le Gouguec > Cc: dmitry@gutov.dev, juri@linkov.net, 68183@debbugs.gnu.org, > tom@tromey.com, spwhitton@spwhitton.name > Date: Thu, 29 Aug 2024 16:36:28 +0100 > > ACK; got the attached at the tip of my emacs-30 branch, and my finger > over the 'git push' button. Let me know if it's time to 'C-x v P'. > (And mark this bug "done", since I believe this was the last loose end?) OK, thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 12:43:32 2024 Received: (at 68183-done) by debbugs.gnu.org; 29 Aug 2024 16:43:32 +0000 Received: from localhost ([127.0.0.1]:52082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjiFA-0005ha-0l for submit@debbugs.gnu.org; Thu, 29 Aug 2024 12:43:32 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:38537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjiF7-0005hD-BG for 68183-done@debbugs.gnu.org; Thu, 29 Aug 2024 12:43:30 -0400 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-42baecbd4fbso1278815e9.2 for <68183-done@debbugs.gnu.org>; Thu, 29 Aug 2024 09:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724949688; x=1725554488; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/H6DjwQArDuypGd+/OSdbSCXDQCMgc6O7sV0Jcooxpg=; b=dHVXoemH/etfOPowIJOS0N1io70+zU3gu46Hi5D8608ae3SRZzJAOiqgb/oeZhWxsM oq/DJunCAjhkvdw0McyjTo5/zV6+8iqKFBzkHXX6JDBGB3rVe/M8KGUyLWlLfqY4Xqlg +orpI6DnQa3f7BdyX/Ui6y5prhvT8Z4J+mVviqgEPOkvfZ6b6MvVlFbBokSXkuY6bRKf hQX4MEv9eUd33OZhNEq0ykVkkdQSrOnCJB93xpLDbaaoyrLyu1GQhLPLOuQCfXUdixP/ cLbgE5P2c5q0LXk8W8pLZVn3KeyC7LOu3r9n4uHCmByCb8jA+6h69mVUX3/6S4/ZyjS3 Oowg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724949688; x=1725554488; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/H6DjwQArDuypGd+/OSdbSCXDQCMgc6O7sV0Jcooxpg=; b=qUuPk+tjFYDMe/zk5UAloMF22Jd6E/ky0j/l6AMZ3uAwSeGZyEs/G/RHtd/UkSJ/ra p3ZbqGrTUoXdwcoM3RQoHi3ot3lL24bt0jplJbTCPA+P7hMPehHDlyaib6acyqoPjyuw pGPSZaYTy2EISVvhv0BlHSsjDLu3QJlBGTIC95ufm9XJwqh9hXGtQNQOAtsCIoyGYRZt CRSOsE0NiS4exBxDnGxDui3m6BzIq5/6WoH2FE0SJ9xkcBTyyJJaTWBSYf+fpTYIN0c9 yis0pQQutNv2D2TBOzmDijSrmfb0Mj5bvE1eaBQBsyXZo55PcuVB149NIvO53iqZhwwu Wz5g== X-Forwarded-Encrypted: i=1; AJvYcCWd4iMLZR7E1cSJWks6ddbV58B2IV74I2oY3e2C5uy+YXSQ/GcbchdZ02bjcjgp4sB9lVxbqXc/VC6N@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx8L2ggIB7HP7IcjcoOSYjRyfuC2cIUxL9ikP1DpNmwTvS0wEcl nQpZzvYzLe6LcxOQcser5yaSFlhBPQoU0A6B1Kbc45HpQCv9SayT X-Google-Smtp-Source: AGHT+IFKa/OApYrc6JSulpgltMLqLa+Dj08luV0mIBrERZ3jt8xyp+FOZv6vLT4y7QweGrNzWwPW8g== X-Received: by 2002:a05:600c:4f42:b0:427:f1a9:cb06 with SMTP id 5b1f17b1804b1-42bb01331ffmr18226435e9.0.1724949687236; Thu, 29 Aug 2024 09:41:27 -0700 (PDT) Received: from hirondell ([80.80.188.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ba639d633sm55669325e9.19.2024.08.29.09.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 09:41:26 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out In-Reply-To: <868qwffi23.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 29 Aug 2024 18:46:28 +0300") References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> <87zfuyrrfz.fsf@gmail.com> <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> <87ttl43f2x.fsf@gmail.com> <06a946b4-b06a-4e10-93d5-b6d6b8bd9fcf@gutov.dev> <87h6bwqujo.fsf@gmail.com> <9446a412-5221-4466-b7e8-937957fd82f2@gutov.dev> <877ccbhg8m.fsf@gmail.com> <86frqzwft6.fsf@gnu.org> <87msl5av0l.fsf@gmail.com> <86r0agsp1b.fsf@gnu.org> <87v7zjwdc3.fsf@gmail.com> <868qwffi23.fsf@gnu.org> Date: Thu, 29 Aug 2024 17:41:25 +0100 Message-ID: <87jzfzs2mi.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Kévin Le Gouguec >> Cc: dmitry@gutov.dev, juri@linkov.net, 68183@debbugs.gnu.org, >> tom@tromey.com, spwhitton@spwhitton.name >> Date: Thu, 29 Aug 2024 16:36:28 +0100 >> >> ACK; got the at [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [80.80.188.36 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kevin.legouguec[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.47 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 68183-done Cc: dmitry@gutov.dev, juri@linkov.net, tom@tromey.com, 68183-done@debbugs.gnu.org, spwhitton@spwhitton.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Kévin Le Gouguec >> Cc: dmitry@gutov.dev, juri@linkov.net, 68183@debbugs.gnu.org, >> tom@tromey.com, spwhitton@spwhitton.name >> Date: Thu, 29 Aug 2024 16:36:28 +0100 >> >> ACK; got the at [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.47 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [80.80.188.36 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.47 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kevin.legouguec[at]gmail.com) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Cc: dmitry@gutov.dev, juri@linkov.net, 68183@debbugs.gnu.org, >> tom@tromey.com, spwhitton@spwhitton.name >> Date: Thu, 29 Aug 2024 16:36:28 +0100 >>=20 >> ACK; got the attached at the tip of my emacs-30 branch, and my finger >> over the 'git push' button. Let me know if it's time to 'C-x v P'. >> (And mark this bug "done", since I believe this was the last loose end?) > > OK, thanks. Thank y'all; pushed, and closing with this message =F0=9F=99=87 From unknown Fri Jun 20 20:10:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 27 Sep 2024 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator