From owner-svn-src-head@FreeBSD.ORG Sun Jun 15 16:38:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 591A3F9E; Sun, 15 Jun 2014 16:38:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4656C28FC; Sun, 15 Jun 2014 16:38:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5FGcIYH031498; Sun, 15 Jun 2014 16:38:18 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5FGcHpG031496; Sun, 15 Jun 2014 16:38:17 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201406151638.s5FGcHpG031496@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 15 Jun 2014 16:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267512 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 16:38:18 -0000 Author: pfg Date: Sun Jun 15 16:38:17 2014 New Revision: 267512 URL: http://svnweb.freebsd.org/changeset/base/267512 Log: patch: add dry-run alias for compatibility with other implementations. Other implementations of patch(1), including GNU patch and "svn patch" have a --dry-run option which does the same as our -C or --check option. Add a new alias to make our implementation more compatible. MFC after: 1 week Modified: head/usr.bin/patch/patch.1 head/usr.bin/patch/patch.c Modified: head/usr.bin/patch/patch.1 ============================================================================== --- head/usr.bin/patch/patch.1 Sun Jun 15 13:45:37 2014 (r267511) +++ head/usr.bin/patch/patch.1 Sun Jun 15 16:38:17 2014 (r267512) @@ -21,7 +21,7 @@ .\" .\" $OpenBSD: patch.1,v 1.27 2014/04/15 06:26:54 jmc Exp $ .\" $FreeBSD$ -.Dd June 12, 2014 +.Dd June 15, 2014 .Dt PATCH 1 .Os .Sh NAME @@ -107,7 +107,7 @@ This is equivalent to specifying This option is currently the default, unless .Fl -posix is specified. -.It Fl C , Fl Fl check +.It Fl C , Fl Fl check , Fl Fl dry-run Checks that the patch would apply cleanly, but does not modify anything. .It Fl c , Fl Fl context Forces Modified: head/usr.bin/patch/patch.c ============================================================================== --- head/usr.bin/patch/patch.c Sun Jun 15 13:45:37 2014 (r267511) +++ head/usr.bin/patch/patch.c Sun Jun 15 16:38:17 2014 (r267512) @@ -469,6 +469,7 @@ get_some_switches(void) {"context", no_argument, 0, 'c'}, {"debug", required_argument, 0, 'x'}, {"directory", required_argument, 0, 'd'}, + {"dry-run", no_argument, 0, 'C'}, {"ed", no_argument, 0, 'e'}, {"force", no_argument, 0, 'f'}, {"forward", no_argument, 0, 'N'},