From 68cbcf1a57ad273f5dee03223eafd6ea21d8e8ec Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 1 Feb 2007 18:01:43 +0000 Subject: When checking to see if a checked-out copy of the file is the same as what is in the repo, expand keywords before doing the diff. OK xsa@ --- usr.bin/rcs/co.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c index fdf895bd3a2..ff4feb99ec5 100644 --- a/usr.bin/rcs/co.c +++ b/usr.bin/rcs/co.c @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.100 2006/11/10 16:31:29 millert Exp $ */ +/* $OpenBSD: co.c,v 1.101 2007/02/01 18:01:42 millert Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -520,6 +520,10 @@ checkout_file_has_diffs(RCSFILE *rfp, RCSNUM *frev, const char *dst) warnx("failed to load revision"); return (D_ERROR); } + if ((bp = rcs_kwexp_buf(bp, rfp, frev)) == NULL) { + warnx("failed to expand tags"); + return (D_ERROR); + } (void)xasprintf(&tempfile, "%s/diff.XXXXXXXXXX", rcs_tmpdir); rcs_buf_write_stmp(bp, tempfile); -- cgit v1.2.3