diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2009-03-27 07:28:58 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2009-03-27 07:28:58 +0000 |
commit | f6008a275cc54023994ff4351490a56f4f96d685 (patch) | |
tree | 56419637fef45f4ffe5662ebd4d6ef93eb10fde6 | |
parent | 52806dfb96c9e8c1c196b9158d35e4b694f6a365 (diff) |
make sure that when we try to send a Set-sticky to the client,
we only do so if the file we're checking out was not supplied
on the command-line. Otherwise we'll end up setting CVS/Tag
for the entire directory instead of slapping a sticky tag
only on the file supplied.
-rw-r--r-- | usr.bin/cvs/checkout.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c index d0f7fcf701f..8c3ae51360a 100644 --- a/usr.bin/cvs/checkout.c +++ b/usr.bin/cvs/checkout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checkout.c,v 1.162 2009/03/25 21:50:33 joris Exp $ */ +/* $OpenBSD: checkout.c,v 1.163 2009/03/27 07:28:57 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -598,9 +598,11 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags) /* * If this file has a tag, push out the Directory with the - * tag to the client. + * tag to the client. Except when this file was explicitly + * specified on the command line. */ - if (tag != NULL && strcmp(cf->file_wd, lastwd)) { + if (tag != NULL && strcmp(cf->file_wd, lastwd) && + !(cf->file_flags & FILE_USER_SUPPLIED)) { strlcpy(lastwd, cf->file_wd, MAXPATHLEN); cvs_server_set_sticky(cf->file_wd, sticky); } |