aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodney W. Grimes <rgrimes@FreeBSD.org>1994-05-26 06:06:47 +0000
committerRodney W. Grimes <rgrimes@FreeBSD.org>1994-05-26 06:06:47 +0000
commit02fab103c2c95a70fba081eca1f9c05e6665b872 (patch)
treead401e41b637b5be565876b6c80cd9e142a5eefa
parentdea673e932532f8f2d630dff2dcfc0c4a2eaf184 (diff)
downloadsrc-02fab103c2c95a70fba081eca1f9c05e6665b872.tar.gz
src-02fab103c2c95a70fba081eca1f9c05e6665b872.zip
Got this fix from think.com:
The following two patches should allow the documented "-I !" option to skip the ignore lists and import/update all files in the directory. I need it to force certain files to import (ie, csh.a which is part of the csh documentation).
Notes
Notes: svn path=/head/; revision=1555
-rw-r--r--gnu/usr.bin/cvs/cvs/ignore.c2
-rw-r--r--gnu/usr.bin/cvs/cvs/import.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/gnu/usr.bin/cvs/cvs/ignore.c b/gnu/usr.bin/cvs/cvs/ignore.c
index 74ab90c785ad..823648786c60 100644
--- a/gnu/usr.bin/cvs/cvs/ignore.c
+++ b/gnu/usr.bin/cvs/cvs/ignore.c
@@ -147,7 +147,7 @@ ign_add (ign, hold)
* (saving it if necessary). We also catch * as a special case in a
* global ignore file as an optimization
*/
- if (isspace (*(ign + 1)) && (*ign == '!' || *ign == '*'))
+ if ((!*(ign+1) || isspace (*(ign+1))) && (*ign == '!' || *ign == '*'))
{
if (!hold)
{
diff --git a/gnu/usr.bin/cvs/cvs/import.c b/gnu/usr.bin/cvs/cvs/import.c
index 095a80042f07..288b9b265ba7 100644
--- a/gnu/usr.bin/cvs/cvs/import.c
+++ b/gnu/usr.bin/cvs/cvs/import.c
@@ -330,10 +330,14 @@ import_descend (message, vtag, targc, targv)
{
while ((dp = readdir (dirp)) != NULL)
{
- if (ign_name (dp->d_name) || !isdir (dp->d_name))
+ if (!strcmp(".", dp->d_name) || !strcmp("..", dp->d_name))
+ continue;
+ if (!isdir (dp->d_name) || ign_name (dp->d_name))
continue;
err += import_descend_dir (message, dp->d_name,
vtag, targc, targv);
+ /* need to re-load .cvsignore after each dir traversal */
+ ign_add_file (CVSDOTIGNORE, 1);
}
(void) closedir (dirp);
}