summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2017-05-28 16:58:54 +0000
committerjoris <joris@openbsd.org>2017-05-28 16:58:54 +0000
commitd884564e3606faf6a56ba4148e61c35473bb9e92 (patch)
treee99de268e1de768a1238e05dec126d8ebf218ad2 /usr.bin/cvs
parentBring the opencvs log message template inline with other cvs implementations. (diff)
downloadwireguard-openbsd-d884564e3606faf6a56ba4148e61c35473bb9e92.tar.xz
wireguard-openbsd-d884564e3606faf6a56ba4148e61c35473bb9e92.zip
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/cvs')
-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);
}