* [PATCH]: cg-clean confused by symlinks to directories
@ 2005-09-23 22:12 Pavel Roskin
0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2005-09-23 22:12 UTC (permalink / raw)
To: Petr Baudis, git
cg-clean confused by symlinks to directories
It turns out that "git-ls-files --others" shows symlinks to directories.
That shouldn't trigger internal error in cg-clean. Such symlinks should
be treated like files and removed even without the "-d" option.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/cg-clean b/cg-clean
--- a/cg-clean
+++ b/cg-clean
@@ -111,7 +111,7 @@ clean_files()
cg-status "$xopt" -w | sed -n 's/^? //p' |
for file in $(cat); do
path="${_git_relpath}$file"
- if [ -d "$path" ]; then
+ if [ -d "$path" -a ! -L "$path" ]; then
# Sanity check, shouldn't happen
echo "FATAL: cg-status reports directories (internal error)" >&2
exit 1
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-23 22:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-23 22:12 [PATCH]: cg-clean confused by symlinks to directories Pavel Roskin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).