From: Andrii Kolomoiets <andreyk.mad@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 38615@debbugs.gnu.org
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 [thread overview]
Message-ID: <m2sglkys2c.fsf@gmail.com> (raw)
In-Reply-To: <71ee7487-8536-125d-f998-e8995801594c@yandex.ru> (Dmitry Gutov's message of "Mon, 16 Dec 2019 15:23:38 +0200")
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
Dmitry Gutov <dgutov@yandex.ru> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vc-git-ls-files-in-untracked-dir.diff --]
[-- Type: text/x-patch, Size: 667 bytes --]
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"
next prev parent reply other threads:[~2019-12-16 19:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-14 12:41 bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory Andrii Kolomoiets
2019-12-16 1:25 ` Dmitry Gutov
2019-12-16 8:00 ` Andrii Kolomoiets
2019-12-16 13:23 ` Dmitry Gutov
2019-12-16 19:43 ` Andrii Kolomoiets [this message]
2019-12-16 23:53 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2sglkys2c.fsf@gmail.com \
--to=andreyk.mad@gmail.com \
--cc=38615@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.