[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A project-files implementation for Git projects
From: |
Dmitry Gutov |
Subject: |
Re: A project-files implementation for Git projects |
Date: |
Sun, 15 Sep 2019 11:29:12 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 14.09.2019 19:43, Tassilo Horn wrote:
Why exclude unregistered? I don't imagine they would slow anything
down.
Because IMHO they are not interesting except if they were just created
by myself and not yet added which seemed like a minor edge case (and at
least git ls-files lists files which are not yet committed but staged).
Why else would they be there if not created by yourself?
Machine-generated files are usually in gitignore.
And every new file goes through this status. It would be an omission if
project-find-file could find the file you just created (and probably
working on).
And because it seems to me that git is more an exception in being able
to list unregistered files.
If some VC backends just can't provide the full functionality, we should
disable using them by default (and only leave 'Git in the defcustom you
added, with some explanation).
Speaking of ignores format, maybe they should just be whatever the
backend in question understands, e.g. the contents of gitignore
verbatim.
I don't see how that would work except by modifying (or moving back and
forth) the existing .{git,hg,bzr}ignore to include project-vc-ignores.
It's an option, although not a very fail-proof one.
Git has helpful options like --exclude and --exclude-from, although it
seems they don't affect the already tracked files. For which there are
different things we can do:
* Use negative patterns (https://stackoverflow.com/a/53083343/615245),
this approach seems to recommend we use a separate argument like
extra-ignores for the backend command. --exclude-from should help with
whitelisting entries, though.
* Grep the output, or process it in Emacs programmatically.
* Idea from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556584#10,
though using it might not be the fastest option. Someone should
benchmark it.
With the first option, the command line would look like:
git ls-files -c -o --exclude=!whitelisted-dir1
--exclude=!whitelisted-dir2 --exclude-standard ":!:extra-ignore1"
":!:extra-ignore2"
- Re: A project-files implementation for Git projects, (continued)
- Re: A project-files implementation for Git projects, Tassilo Horn, 2019/09/22
- Re: A project-files implementation for Git projects, Dmitry Gutov, 2019/09/22
- Re: A project-files implementation for Git projects, Tassilo Horn, 2019/09/23
- Re: A project-files implementation for Git projects, Dmitry Gutov, 2019/09/23
- Re: A project-files implementation for Git projects, Tassilo Horn, 2019/09/27
- Re: A project-files implementation for Git projects, Dmitry Gutov, 2019/09/29
- Re: A project-files implementation for Git projects, Stefan Monnier, 2019/09/29
- Re: A project-files implementation for Git projects, Dmitry Gutov, 2019/09/30
- Re: A project-files implementation for Git projects, Dmitry Gutov, 2019/09/13
- Re: A project-files implementation for Git projects, Tassilo Horn, 2019/09/14
- Re: A project-files implementation for Git projects,
Dmitry Gutov <=
- Re: A project-files implementation for Git projects, Dmitry Gutov, 2019/09/15
- Re: A project-files implementation for Git projects, Robert Pluim, 2019/09/10
- Re: A project-files implementation for Git projects, Dmitry Gutov, 2019/09/10
- Re: A project-files implementation for Git projects, Eli Zaretskii, 2019/09/10