Subject: bug#38615: closed (Re: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 16 Dec 2019 23:55:02 +0000

Your bug report

#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
38615: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38615
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory
From: Dmitry Gutov <[email-masked]>
To: Andrii Kolomoiets <[email-masked]>
Cc: [email-masked]
Date: Tue, 17 Dec 2019 01:53:56 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On 16.12.2019 21:43, Andrii Kolomoiets wrote:

>> 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.

Thanks.

>> 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.

Okay, let's try this, thank you.

I believe the original idea was to avoid overwhelming the user when 
there are a lot of unregistered files (build artefacts and the like), 
but that's what gitignore is for.

Both patches are pushed, closing.

Subject: 27.0.50; vc-git: Wrong status in vc-dir after registering directory
From: Andrii Kolomoiets <[email-masked]>
To: [email-masked]
Date: Sat, 14 Dec 2019 14:41:11 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

0. mkdir test && cd test
   git init
   touch file
   git add file
   git commit -m "initial"
   mkdir dir
   touch dir/file1
1. emacs -Q
2. C-x v d
   "dir/" is listed with "unregistered" status.
3. v
   "dir/" has "added" status.
4. g
   "dir/file1" is listed with "up-to-date" status.  Shouldn't it have
   "added" status?
5. g
   Now "dir/file1" properly has "added" status.

Also:
- After step 3 point is moved to word "dir" on second line.
- Press "n" before step 3 to move point to "dir/". After step 3 "dir/"
  status is not updated and remains "unregistered".