GNU bug report logs - #55632
[PATCH] Add new user option project-vc-find-tracked-only

Previous Next

Package: emacs;

Reported by: Jan Synáček <jan.synacek <at> posteo.org>

Date: Wed, 25 May 2022 14:04:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: jan.synacek <at> posteo.org
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 55632 <at> debbugs.gnu.org, DG <raaahh <at> gmail.com>
Subject: bug#55632: [PATCH] Add new user option project-vc-find-tracked-only
Date: Mon, 30 May 2022 10:08:52 +0000
On 27.05.2022 15:55, Dmitry Gutov wrote:
> On 25.05.2022 12:08, Jan Synáček wrote:
>> Currently, `project-find-file' always includes untracked files, which 
>> is
>> not always the desired behavior. This patch adds a new user option to
>> make only find the actual project files. By default, the variable is 
>> set
>> to nil, which means the behavior is not changed.
> 
> Sure, thanks. I'll review this soon-ish.
> 
> As long as you are aware of the user option project-vc-ignores (which
> can be set directory-locally), and are certain that it doesn't satisfy
> your needs.

Short answer:
Yes, I'm aware, but that option is something different. I don't want to 
add anything to ignore.

Long answer:
This mostly applies to the git and mercurial Emacs backends where the 
untracked files are
used by default now. I think that presenting a "project" as pretty much 
everything in a
folder (unless selectively ignored by using project-vc-ignores, for 
example) only makes
sense if there is no underlying VCS, otherwise it's pretty much 
backwards. Because if
there's already a repo that tracks files, the project should be, in my 
opinion, just the
files in that repo that the underlying VCS sees as tracked. That is the 
default behavior
in git and mercurial as far as I know (I don't use mercurial much, but 
use git a lot). The
VCS also has a mechanism for including untracked files in case the user 
wants to see them
in some operations, and ignoring additional files so that they don't 
count towards those
untracked files. These two options should map 1 to 1 to Emacs custom 
variables, in my
opinion.
So, in summary, I would suggest to change the VC backends that support 
this to behave by
default as the underlying VCS would behave and use custom variables to 
add additional
tweaks for non-default stuff. Of course, that is out of scope for this 
patch.




This bug report was last modified 2 years and 352 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.