From: Jeff King <peff@peff.net>
To: Petr Baudis <pasky@suse.cz>, git@vger.kernel.org
Subject: [PATCH] list_untracked_files: remove empty squashed directories
Date: Fri, 9 Jun 2006 01:41:34 -0400 [thread overview]
Message-ID: <20060609054134.GA16026@coredump.intra.peff.net> (raw)
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
reply other threads:[~2006-06-09 5:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060609054134.GA16026@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox