Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git status: ignore empty directories (because they cannot be added)

From: Matthias Lederhofer <hidden>
Date: 2016-06-15 22:42:27

quoted
Well, anyway, here the reasons for this patch:
- Working in a git repository with a lot of empty directories is
  annoying, because all of them show up in git status even though they
  cannot be added. With --no-empty-directories they are hidden.
What directories are they?  Will they some day have files that
you might want to keep track of?  The reason for this question
is, "otherwise you could .gitignore them".
I have been trying ruby on rails and there are some empty directories
which will have files later. I would even add those empty directories
if it would be possible.
quoted
- If there is a directory which may be added because it is quite
  useful to have the -u option to see what is in there to add (without
  using ls path/to/directory).
It really depends on how many files there are in such a
"interesting" directory _and_ other "uninteresting" directories
full of transitory files.  The -u option that disables "skip
contents and show only the top directory" behaviour globally
might not be so useful in such a case -- you will see useful
contents of an otherwise "closed" directory (because it defeats
the --directory flag), but at the same time you would get tons
of uninteresting files in another directory as well in such a
case.  You are likely to end up doing ls path/to/dir after
noticing that there are non-empty foo/ and bar/ directories that
have no tracked files, and you know which one has files
interesting to you.
So I am OK with the change, but I am somewhat still doubtful how
useful the option would be.
The case I think about is that there are some directories which are
not tracked because they contain no files yet. All other directories
which are uninteresting are added to .gitignore. If an untracked
directory shows up in git-status one could easily check with
git-status -u what can be added.

PS: I had a typo in the git mailing list e-mail address and resent my
last e-mail to the list. Your reply did not make it to the list,
perhaps you can send it again.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help