git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a63b611
)
"files" are now excluded from "ignores"
author
short
<>
Wed, 6 Mar 2002 04:27:45 +0000
(
04:27
+0000)
committer
short
<>
Wed, 6 Mar 2002 04:27:45 +0000
(
04:27
+0000)
bin/cvsutil
patch
|
blob
|
history
diff --git
a/bin/cvsutil
b/bin/cvsutil
index
cd999a5
..
fd833d5
100755
(executable)
--- a/
bin/cvsutil
+++ b/
bin/cvsutil
@@
-120,6
+120,17
@@
sub localdircore
fordirs \&localdir,@dir_dirs;
}
fordirs \&localdir,@dir_dirs;
}
+sub filterout
+{
+my($from,@what)=@_;
+
+ my %hash=map { $_=>1; } @$from;
+ for (@what) {
+ delete $hash{$_};
+ }
+ return keys %hash;
+}
+
sub localreaddir
{
local *E;
sub localreaddir
{
local *E;
@@
-148,6
+159,7
@@
sub localreaddir
}
}
close I;
}
}
close I;
+ @dir_ignores=filterout \@dir_ignores,@dir_dirs,@dir_files;
}
else {
mayfatal "File \"".CVSIGNORE."\" cannot be opened" if !$!{ENOENT};
}
else {
mayfatal "File \"".CVSIGNORE."\" cannot be opened" if !$!{ENOENT};
@@
-158,13
+170,8
@@
sub localreaddir
mayfatal "Cannot read directory \".\"";
return 0;
}
mayfatal "Cannot read directory \".\"";
return 0;
}
- @dir_workings=
readdir D
;
+ @dir_workings=
filterout [readdir D],@dir_dirs,@dir_files,@dir_ignores,@all_ignore,".",".."
;
closedir D;
closedir D;
- my %delworkings=map { $_=>1; } @dir_workings;
- for (@dir_dirs,@dir_files,@dir_ignores,@all_ignore,".","..") {
- delete $delworkings{$_};
- }
- @dir_workings=keys %delworkings;
return 1;
}
return 1;
}