all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Shouldn't vc-dir show only files under VC by default?
@ 2019-09-29  9:53 ndame
  2019-09-29 21:48 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: ndame @ 2019-09-29  9:53 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

When I start vc-dir I usually have to wade through a bunch of unregistered
files (temporary scripts, etc.). I know I can hide them from view with
x, I'm just wondering about the design decision of showing them by
default.

In my experience one works most of the time with files under VC and
occasionally adds news files. It is much more often that one wants to
see VC-controlled files than unregistered files.

If this is the case then shouldn't vc-dir work vica versa, that is
showing only files under VC by default and having a key to show
unregistered files if the user wants to see them?
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Shouldn't vc-dir show only files under VC by default?
  2019-09-29  9:53 ndame
@ 2019-09-29 21:48 ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2019-09-29 21:48 UTC (permalink / raw)
  To: help-gnu-emacs

> When I start vc-dir I usually have to wade through a bunch of unregistered
> files (temporary scripts, etc.). I know I can hide them from view with
> x, I'm just wondering about the design decision of showing them by
> default.

AFAIK, the "normal" way to work with tools like Git, Svn, ... is to set
your "ignores" such that all those "other files" don't appear.

IOW, "unregistered" are warnings reminding you that you haven't
yet told your tool whether to control them or ignore them.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Shouldn't vc-dir show only files under VC by default?
@ 2019-09-30  4:32 ndame
  2019-09-30  7:14 ` Eli Zaretskii
  2019-10-01 12:49 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: ndame @ 2019-09-30  4:32 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

> AFAIK, the "normal" way to work with tools like Git, Svn, ... is to set
> your "ignores" such that all those "other files" don't appear.
> 
> IOW, "unregistered" are warnings reminding you that you haven't
> yet told your tool whether to control them or ignore them.

The problem is I have to use a tool (Android Studio) which generates
lots of extra files and directories automatically in the source tree
which I may or may not modify. If I don't modify them then they can be
ignored, but if I do modify them then I have to add them to git and in
the latter case it is inconvenient that I have to unignore the file
first.

It would be much simpler to simply don't show unregistered files by
default and have a key to show them only if I need to add some of them
to git.

I guess emacs devs don't use such tools which generates extra files
like this, that's why the need is not obvious that unregistered files
are unconvenient to show by default.

But I admit it is somewhat uncommon that I use Android Studio (which
is kind of unavoidable if one develops an Android app, because of the
support it provides) and I use emacs for version control. It is
because I find Android Studio's commit/diff tools inferior to emacs.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Shouldn't vc-dir show only files under VC by default?
  2019-09-30  4:32 Shouldn't vc-dir show only files under VC by default? ndame
@ 2019-09-30  7:14 ` Eli Zaretskii
  2019-10-01 12:49 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2019-09-30  7:14 UTC (permalink / raw)
  To: help-gnu-emacs

> From: ndame <emacsuser@freemail.hu>
> Date: Mon, 30 Sep 2019 06:32:48 +0200 (CEST)
> 
> The problem is I have to use a tool (Android Studio) which generates
> lots of extra files and directories automatically in the source tree
> which I may or may not modify. If I don't modify them then they can be
> ignored, but if I do modify them then I have to add them to git and in
> the latter case it is inconvenient that I have to unignore the file
> first.

Sorry, I don't understand how modifying or not modifying these files
affects whether they should be ignored (by putting them in
.gitignore).  Can you explain?

> It would be much simpler to simply don't show unregistered files by
> default and have a key to show them only if I need to add some of them
> to git.

The way VC knows whether they might need to be added is via the
.gitignore file.  So the easiest way to solve your problem is to add
patterns to that file that would ignore the generated files.
Alternatively, maybe you can cause the Studio to generate them in a
special directory.

> I guess emacs devs don't use such tools which generates extra files
> like this, that's why the need is not obvious that unregistered files
> are unconvenient to show by default.

I build Emacs inside the Git repository, and that creates a lot of
files I don't care about.  They are all in .gitignore.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Shouldn't vc-dir show only files under VC by default?
  2019-09-30  4:32 Shouldn't vc-dir show only files under VC by default? ndame
  2019-09-30  7:14 ` Eli Zaretskii
@ 2019-10-01 12:49 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2019-10-01 12:49 UTC (permalink / raw)
  To: help-gnu-emacs

> The problem is I have to use a tool (Android Studio) which generates
> lots of extra files and directories automatically in the source tree
> which I may or may not modify.

AFAIK, this problem should affect all users, rather than only VC users,
because it's standard practice to show unregistered files (e.g. `git status`
also shows them).

So, maybe you should ask around the Android Studio crowd how people
usually deal with that.

> If I don't modify them then they can be
> ignored, but if I do modify them then I have to add them to git and in
> the latter case it is inconvenient that I have to unignore the file
> first.

You don't need to "unignore" them.  Just `git add <file>` and you're done.
`.gitignore` only determines whether a unknown file should be mentioned
as "unregistered" or not; it has no effect on files which are under
Git's control.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-01 12:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-30  4:32 Shouldn't vc-dir show only files under VC by default? ndame
2019-09-30  7:14 ` Eli Zaretskii
2019-10-01 12:49 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2019-09-29  9:53 ndame
2019-09-29 21:48 ` Stefan Monnier

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.