=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/patch/patch.c,v retrieving revision 1.75 retrieving revision 1.76 diff -c -r1.75 -r1.76 *** src/usr.bin/patch/patch.c 2023/10/25 20:05:43 1.75 --- src/usr.bin/patch/patch.c 2024/03/22 19:22:23 1.76 *************** *** 1,4 **** ! /* $OpenBSD: patch.c,v 1.75 2023/10/25 20:05:43 bluhm Exp $ */ /* * patch - a program to apply diffs to original files --- 1,4 ---- ! /* $OpenBSD: patch.c,v 1.76 2024/03/22 19:22:23 jcs Exp $ */ /* * patch - a program to apply diffs to original files *************** *** 109,114 **** --- 109,116 ---- /* true if -R was specified on command line. */ static bool reverse_flag_specified = false; + static bool Vflag = false; + /* buffer holding the name of the rejected patch file. */ static char rejname[PATH_MAX]; *************** *** 255,261 **** my_exit(2); } ! if (backup_type == none) { if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL) v = getenv("VERSION_CONTROL"); if (v != NULL || !posix) --- 257,263 ---- my_exit(2); } ! if (!Vflag) { if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL) v = getenv("VERSION_CONTROL"); if (v != NULL || !posix) *************** *** 641,646 **** --- 643,649 ---- break; case 'V': backup_type = get_version(optarg); + Vflag = true; break; #ifdef DEBUGGING case 'x': *************** *** 677,684 **** fprintf(stderr, "usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory]\n" " [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]\n" ! " [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]\n" ! " [--posix] [origfile [patchfile]]\n" " patch