From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs Subject: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory Date: Mon, 16 Dec 2019 21:43:39 +0200 Message-ID: References: <71ee7487-8536-125d-f998-e8995801594c@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175460"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) Cc: 38615@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 16 20:44:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igwHq-000jWL-2l for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Dec 2019 20:44:10 +0100 Original-Received: from localhost ([::1]:59226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igwHo-00088L-Uy for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Dec 2019 14:44:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46383) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igwHj-00088F-FD for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2019 14:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igwHi-0005Vz-Cx for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2019 14:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34413) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igwHi-0005Vn-8s for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2019 14:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1igwHi-0001dQ-7c for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2019 14:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Dec 2019 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38615 X-GNU-PR-Package: emacs Original-Received: via spool by 38615-submit@debbugs.gnu.org id=B38615.15765254306258 (code B ref 38615); Mon, 16 Dec 2019 19:44:02 +0000 Original-Received: (at 38615) by debbugs.gnu.org; 16 Dec 2019 19:43:50 +0000 Original-Received: from localhost ([127.0.0.1]:40386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igwHW-0001cs-Jp for submit@debbugs.gnu.org; Mon, 16 Dec 2019 14:43:50 -0500 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:35174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igwHU-0001cf-0S for 38615@debbugs.gnu.org; Mon, 16 Dec 2019 14:43:49 -0500 Original-Received: by mail-lj1-f175.google.com with SMTP id j6so8144209lja.2 for <38615@debbugs.gnu.org>; Mon, 16 Dec 2019 11:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KzAvMC+mR3ULjE+8eIWqW0M6We8alS2v4rYwSj7iKBM=; b=q2Y+9Hvlw7p/i19OosOZ/4tfAVabDND6pMxSLubp3tTTQimWNxbpalT5S/FTfCb6LM LQwivu6OZL0PIbHSzjz/MzhOn99FH5LdzselUxKwt2Wryq2C5WTEHmVBNyCB8ucVqaIt U+s5XZaaMu2fu6vH4nmDOAeWa9E1lxU5tJsnhGszRDqBkgaQmv8aRhk5XbLwDsj3WWqB YQH3uy409Z03+h3Iu1S7ndWNxJxtv2kmNDbOHmH2Yusj0Mu+oc16WCC3ZdN+Yto/oFTN Dig1/GXgyN9Tuvr8MsvZ5re+vjzUyP17YZalYNsF+NANoKcJVgJRDZI9puHCW5J7a2iL uUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KzAvMC+mR3ULjE+8eIWqW0M6We8alS2v4rYwSj7iKBM=; b=XOIEExLty35m/DifK/EXvSTR9MkPKUsu4HZfxLpLo2/iuHj/F6WKHaMikzF7lSdkai uNNGZE4iOwQCkYO2lRzvwTuh3q5KCHW/h+QCzmcKHPLL5UVBhBZWrAm3j+0I/r6Xbf5I p9OlD57cAT3gp0sBbnmTZmsG7avsuMyS+8dsOpSdSjCgYQ12EzB15c7iJIi3VMdH+W+b /Sf5VGanzTRh5CmVjYeHtH62xhDzbi4wEgu3fo1G2g7jIISt/rukwj+cUVfW78CqzcbJ DaB0wYXQWE/uIGJQhSVzB92z81q4lnGHx/6BKfJncU3YspP2nM1yZN7QzBliFGyVe5g4 KjJg== X-Gm-Message-State: APjAAAV3HrAzXh5RIeEO5GlXzr5uNoJ3a6qkvObyTiSpRHg/U+ySpCh2 P8eAjbp8M2oTXZ/cOiTwsfWW/MUl X-Google-Smtp-Source: APXvYqyx1n650WkbF92ss4pq0o+1cddCX1cOOD7jFtx0CixQlulHxKk3iCriEc2gDbl65NvO0HgPLg== X-Received: by 2002:a2e:b4e7:: with SMTP id s7mr534465ljm.58.1576525421616; Mon, 16 Dec 2019 11:43:41 -0800 (PST) Original-Received: from muffinmac.local ([91.206.110.139]) by smtp.gmail.com with ESMTPSA id u13sm9500167lfq.19.2019.12.16.11.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 11:43:40 -0800 (PST) In-Reply-To: <71ee7487-8536-125d-f998-e8995801594c@yandex.ru> (Dmitry Gutov's message of "Mon, 16 Dec 2019 15:23:38 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173447 Archived-At: --=-=-= Content-Type: text/plain Dmitry Gutov writes: >> Though point is stil moves to the word "dir" on the second line after >> step 3. >> And directory "dir" status is not updated when: >> 2. C-x v d >> 3. n >> 4. v >> Should it be different bug reports for those cases? > > Yes. > > These would have to be fixed in vc-dir rather than vc-git, and they > would require some more investigation about the proper behavior and > the places to fix. > > Regarding the moving of point, personally, I'm not sure which of the > behaviors is more correct. It's `vc-dir-move-to-goal-column' called after `vc-register'. I will make dedicated bug report. > The latter is caused basically by: > > - Git returning a directory in the file status list. > - Directories not having an actual VCS status in our system. How about to list files and not directories? This will allow to register untracked files under untracked directory with single `v'. Please see attached patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vc-git-ls-files-in-untracked-dir.diff diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 71307cdffd..e40dcadf56 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -615,8 +615,7 @@ vc-git-dir-status-goto-stage "ls-files" "-z" "-u" "--")) ('ls-files-unknown (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-o" "--directory" - "--no-empty-directory" "--exclude-standard" "--")) + "ls-files" "-z" "-o" "--exclude-standard" "--")) ('ls-files-ignored (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-o" "-i" "--directory" --=-=-=--