[PATCH] list_untracked_files: remove empty squashed directories
- From
Jeff King <peff@peff.net>
- Date
- Jun 9, 2006, 05:41 UTC
- Message-ID
- <20060609054134.GA16026@coredump.intra.peff.net>
Signed-off-by: Jeff King <peff@peff.net> --- This patch is for cogito.
Ordinarily, I would say if you have empty directories, you should remove them. However, if you have a directory in which all files are excluded, it will still appear in cg-status -w (even though cg-status -S is empty!).
This, of course, means that actual empty directories will also be ignored; there's no way around it without putting logic into git-ls-files to distinguish between the two.
cg-Xlib | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cg-Xlib b/cg-Xlib index 839e9f8..3ec32b7 100755 --- a/cg-Xlib +++ b/cg-Xlib @@ -443,7 +443,7 @@ list_untracked_files() fi fi local listdirs= - [ "$squashflag" != "squashdirs" ] || listdirs=--directory + [ "$squashflag" != "squashdirs" ] || listdirs="--directory --no-empty-directory" git-ls-files -z --others $listdirs "${EXCLUDE[@]}" }
-- 1.4.0.rc2