From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ramkumar Ramachandra Subject: [PATCH 04/17] revert: Rename no_replay to record_origin Date: Mon, 11 Jul 2011 14:53:55 +0000 Message-ID: <1310396048-24925-5-git-send-email-artagnon@gmail.com> References: <1310396048-24925-1-git-send-email-artagnon@gmail.com> Cc: Jonathan Nieder , Junio C Hamano , Christian Couder , Daniel Barkalow To: Git List X-From: git-owner@vger.kernel.org Mon Jul 11 17:02:01 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgHza-0000cM-Hk for gcvg-git-2@lo.gmane.org; Mon, 11 Jul 2011 17:01:50 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757833Ab1GKPBp (ORCPT ); Mon, 11 Jul 2011 11:01:45 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:39328 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757608Ab1GKPBo (ORCPT ); Mon, 11 Jul 2011 11:01:44 -0400 Received: by vws1 with SMTP id 1so2754173vws.19 for ; Mon, 11 Jul 2011 08:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=nQvhm+UIbhTswJAUKdoimQNFY+8YAuNlEb5tf7BeEms=; b=ZTBaZN3JlZqRauFekoQeyrmpzzCB4OkTOKqKbEVEn0qjeHV64lZ+VsUqMGDPtjIx+4 0COJ0SgzXoMRqyuWxCb/Pen+S5Efp62WyStpVjvwpJ52e8BvZfYrdg2hlEUvjOISNOj1 /0YbfdxgQzkEIleb289t7+LqRI2ANh1RQJ8Uk= Received: by 10.52.180.135 with SMTP id do7mr5596036vdc.273.1310396059131; Mon, 11 Jul 2011 07:54:19 -0700 (PDT) Received: from localhost.localdomain (ec2-184-72-137-52.compute-1.amazonaws.com [184.72.137.52]) by mx.google.com with ESMTPS id b9sm4510527vdk.25.2011.07.11.07.54.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jul 2011 07:54:17 -0700 (PDT) X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1310396048-24925-1-git-send-email-artagnon@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Rename the variable corresponding to the "-x" command-line option from "no_replay" to a more apt "record_origin". Suggested-by: Jonathan Nieder Signed-off-by: Ramkumar Ramachandra --- builtin/revert.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/revert.c b/builtin/revert.c index 6c826e1..3d8b3a9 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -35,7 +35,7 @@ static const char * const cherry_pick_usage[] = { NULL }; -static int edit, no_replay, no_commit, mainline, signoff, allow_ff; +static int edit, record_origin, no_commit, mainline, signoff, allow_ff; static enum { REVERT, CHERRY_PICK } action; static struct commit *commit; static int commit_argc; @@ -91,7 +91,7 @@ static void parse_args(int argc, const char **argv) if (action == CHERRY_PICK) { struct option cp_extra[] = { - OPT_BOOLEAN('x', NULL, &no_replay, "append commit name"), + OPT_BOOLEAN('x', NULL, &record_origin, "append commit name"), OPT_BOOLEAN(0, "ff", &allow_ff, "allow fast-forward"), OPT_END(), }; @@ -456,7 +456,7 @@ static int do_pick_commit(void) p = p ? p + 2 : sha1_to_hex(commit->object.sha1); strbuf_addstr(&msgbuf, p); - if (no_replay) { + if (record_origin) { strbuf_addstr(&msgbuf, "(cherry picked from commit "); strbuf_addstr(&msgbuf, sha1_to_hex(commit->object.sha1)); strbuf_addstr(&msgbuf, ")\n"); @@ -551,7 +551,7 @@ static int revert_or_cherry_pick(int argc, const char **argv) die(_("cherry-pick --ff cannot be used with --signoff")); if (no_commit) die(_("cherry-pick --ff cannot be used with --no-commit")); - if (no_replay) + if (record_origin) die(_("cherry-pick --ff cannot be used with -x")); if (edit) die(_("cherry-pick --ff cannot be used with --edit")); -- 1.7.5.GIT