From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ramkumar Ramachandra Subject: [PATCH 05/18] revert: Rename no_replay to record_origin Date: Thu, 4 Aug 2011 16:09:03 +0530 Message-ID: <1312454356-3070-6-git-send-email-artagnon@gmail.com> References: <1312454356-3070-1-git-send-email-artagnon@gmail.com> Cc: Git List , Jonathan Nieder , Christian Couder , Daniel Barkalow , Jeff King To: Junio C Hamano X-From: git-owner@vger.kernel.org Thu Aug 04 12:42:52 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 1QovO6-0006vu-Vb for gcvg-git-2@lo.gmane.org; Thu, 04 Aug 2011 12:42:51 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754067Ab1HDKmq (ORCPT ); Thu, 4 Aug 2011 06:42:46 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:63604 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754006Ab1HDKmo (ORCPT ); Thu, 4 Aug 2011 06:42:44 -0400 Received: by mail-pz0-f42.google.com with SMTP id 37so1836868pzk.1 for ; Thu, 04 Aug 2011 03:42: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=u//1rR6jIJLEEpLpDPDkeaOK9wCKB+I5cCkYH/XTSxo=; b=QAOVdIbjkJxzm7RN7aoB3IWgSYp6+OJiChfRaf+9BBjj40IeAbqHRvybaxuhv3VabS s0+STBBi6a5tklhGV99tF/cu2OYBK1OIKPUXXAaY9dpN5vyObniFAcUsC1jLn99zZaRE 79fBGtFW2EVWa3n2UUVHxPnp+7l0PUc6EbHjs= Received: by 10.142.215.19 with SMTP id n19mr661115wfg.422.1312454564480; Thu, 04 Aug 2011 03:42:44 -0700 (PDT) Received: from localhost.localdomain ([203.110.240.41]) by mx.google.com with ESMTPS id m7sm2090440pbk.6.2011.08.04.03.42.39 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Aug 2011 03:42:43 -0700 (PDT) X-Mailer: git-send-email 1.7.6.351.gb35ac.dirty In-Reply-To: <1312454356-3070-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: The "-x" command-line option is used to record the name of the original commits being picked in the commit message. The variable corresponding to this option is named "no_replay" for historical reasons; the name is especially confusing because the term "replay" is used to describe what cherry-pick does (for example, in the documentation of the "--mainline" option). So, give the variable corresponding to the "-x" command-line option a better name: "record_origin". Mentored-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 30b39c0..794c050 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(), }; @@ -464,7 +464,7 @@ static int do_pick_commit(void) 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"); @@ -559,7 +559,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.6.351.gb35ac.dirty