summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-03-02 16:56:59 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-03-02 16:56:59 +0000
commitd52f4cdbd74b5f0613e44b9af623a042ae3a8ee2 (patch)
tree0b5224d93a1e91fd076fe8c5d0302cda17341595
parentf0bbc244eec8227cf23e2a0b5062ebb6f902a917 (diff)
add a flag to identify the base directory in file hierarchies.
ok jfb@
-rw-r--r--usr.bin/cvs/file.c5
-rw-r--r--usr.bin/cvs/file.h4
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 007c8d5e9d8..d7a04eec8e3 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.53 2005/02/25 20:32:48 jfb Exp $ */
+/* $OpenBSD: file.c,v 1.54 2005/03/02 16:56:58 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -886,6 +886,9 @@ cvs_file_lget(const char *path, int flags, CVSFILE *parent)
return (NULL);
cfp->cf_parent = parent;
+ if ((cfp->cf_type == DT_DIR) && (cfp->cf_parent == NULL))
+ cfp->cf_ddat->cd_flags |= CVS_DIRF_BASE;
+
if ((parent != NULL) && (CVS_DIR_ENTRIES(parent) != NULL))
ent = cvs_ent_get(CVS_DIR_ENTRIES(parent), CVS_FILE_NAME(cfp));
diff --git a/usr.bin/cvs/file.h b/usr.bin/cvs/file.h
index 18c32b33086..f30e388592e 100644
--- a/usr.bin/cvs/file.h
+++ b/usr.bin/cvs/file.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.h,v 1.13 2004/12/15 07:03:04 jfb Exp $ */
+/* $OpenBSD: file.h,v 1.14 2005/03/02 16:56:58 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -101,7 +101,7 @@ typedef struct cvs_file {
#define CVS_DIRF_STATIC 0x01
#define CVS_DIRF_STICKY 0x02
-
+#define CVS_DIRF_BASE 0x04
struct cvs_dir {
struct cvsroot *cd_root;