summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-05-20 05:01:35 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-05-20 05:01:35 +0000
commit953436ae010ef8b64f902cafa1e45d52112eb747 (patch)
treec7004662bcb8a74386ef58ad20db39779b0ecb2d /usr.bin/cvs/file.c
parent8237a312075479ff54c7e6f969c881ab1bd867a3 (diff)
don't attempt to copy the file's tag from the entry if we're dealing
with a directory, otherwise we're squashing the file list as part of the union ok joris
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index b6404cd22b9..dbe220352f6 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.71 2005/05/12 23:43:49 joris Exp $ */
+/* $OpenBSD: file.c,v 1.72 2005/05/20 05:01:34 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1011,13 +1011,15 @@ cvs_file_lget(const char *path, int flags, CVSFILE *parent, struct cvs_ent *ent)
if (ent != NULL) {
/* steal the RCSNUM */
cfp->cf_lrev = ent->ce_rev;
- if (ent->ce_tag != NULL) {
+ ent->ce_rev = NULL;
+
+ if ((ent->ce_type == CVS_ENT_REG) &&
+ (ent->ce_tag != NULL)) {
if ((cfp->cf_tag = cvs_strdup(ent->ce_tag)) == NULL) {
cvs_file_free(cfp);
return (NULL);
}
}
- ent->ce_rev = NULL;
}
if ((cfp->cf_type == DT_DIR) && (cvs_load_dirinfo(cfp, flags) < 0)) {