From 25dfd69675d7a2888ba96df450edf797a506ac93 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Sat, 11 Apr 2009 16:44:59 +0200 Subject: [PATCH] Patch should default to not try to get files from revision control software unless actively asked by the user with the "-g" or "--get" command-line switches or the PATCH_GET environment variable. Make the posixly correct behaviour of not using source control, the global patch default. I.e. default to "-g0". This is related to debian BTS bug: #200895 Please refer to that discussion for more background information and discussion. --- patch.man | 4 +--- src/patch.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/patch.man b/patch.man index 2720090..54e5ba0 100644 --- a/patch.man +++ b/patch.man @@ -392,9 +392,7 @@ and does not get the file; and if negative, asks the user whether to get the file. The default value of this option is given by the value of the .B PATCH_GET -environment variable if it is set; if not, the default value is zero if -.B patch -is conforming to \s-1POSIX\s0, negative otherwise. +environment variable if it is set; if not, the default value is zero. .TP .B "\*=help" Print a summary of options and exit. diff --git a/src/patch.c b/src/patch.c index 59c6fb0..ba62958 100644 --- a/src/patch.c +++ b/src/patch.c @@ -127,7 +127,7 @@ main (int argc, char **argv) backup_if_mismatch = ! posixly_correct; patch_get = ((val = getenv ("PATCH_GET")) ? numeric_string (val, true, "PATCH_GET value") - : posixly_correct - 1); + : 0); val = getenv ("SIMPLE_BACKUP_SUFFIX"); simple_backup_suffix = val && *val ? val : ".orig"; -- 1.5.6.3