From 323cb6218fa9515bdf40ef2b91ef2205e8d39243 Mon Sep 17 00:00:00 2001 From: joris Date: Mon, 29 May 2017 17:18:56 +0000 Subject: [PATCH] cvs_file_classify() was making the mistake of only taking over a sticky tag from Entries for a given file if the sticky tag is present. while changing this we can simplify some logic in update.c on how it decides what tag to use for file classification. --- usr.bin/cvs/file.c | 4 ++-- usr.bin/cvs/update.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index 461e25eb433..54b2a59c6a4 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.270 2017/05/28 17:11:34 joris Exp $ */ +/* $OpenBSD: file.c,v 1.271 2017/05/29 17:18:56 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau @@ -675,7 +675,7 @@ cvs_file_classify(struct cvs_file *cf, const char *tag) cf->file_ent = NULL; if (cf->file_ent != NULL) { - if (cf->file_ent->ce_tag != NULL && cvs_specified_tag == NULL) + if (cvs_specified_tag == NULL) tag = cf->file_ent->ce_tag; if (cf->file_flags & FILE_ON_DISK && diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index 6a2d573da19..5fc1f3743d3 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.174 2016/10/15 22:20:17 millert Exp $ */ +/* $OpenBSD: update.c,v 1.175 2017/05/29 17:18:56 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -337,8 +337,6 @@ cvs_update_local(struct cvs_file *cf) flags = 0; if (cvs_specified_tag != NULL) tag = cvs_specified_tag; - else if (cf->file_ent != NULL && cf->file_ent->ce_tag != NULL) - tag = cf->file_ent->ce_tag; else tag = cvs_directory_tag; -- 2.20.1