summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2017-05-28 16:58:55 +0000
committerJoris Vink <joris@cvs.openbsd.org>2017-05-28 16:58:55 +0000
commit415899aad4e96365d2b74a30fa9a492dddf8e49b (patch)
treeef82a14c70ce30510e46d9e9a29daa94a86c09d9 /usr.bin
parentc6edfd4d40d2e6d02fbd7903dfac19cb8af520ad (diff)
Teach opencvs status to display the sticky tag according to what it really
represents if it is a branch or a revision. ok stsp@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/status.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c
index 52d4c37a73c..ed212edba88 100644
--- a/usr.bin/cvs/status.c
+++ b/usr.bin/cvs/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.98 2016/11/03 20:13:41 joris Exp $ */
+/* $OpenBSD: status.c,v 1.99 2017/05/28 16:58:54 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005-2008 Xavier Santolaria <xsa@openbsd.org>
@@ -235,8 +235,13 @@ cvs_status_local(struct cvs_file *cf)
sizeof(buf));
} else {
rcsnum_tostr(brev, revbuf, sizeof(revbuf));
- (void)xsnprintf(buf, sizeof(buf),
- "(branch: %s)", revbuf);
+ if (RCSNUM_ISBRANCH(brev)) {
+ xsnprintf(buf, sizeof(buf),
+ "(branch: %s)", revbuf);
+ } else {
+ xsnprintf(buf, sizeof(buf),
+ "(revision: %s)", revbuf);
+ }
free(brev);
}