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, 28 Jul 2011 22:22:18 +0530 Message-ID: <1311871951-3497-6-git-send-email-artagnon@gmail.com> References: <1311871951-3497-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 Jul 28 18:56:11 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 1QmTsU-0003g1-NZ for gcvg-git-2@lo.gmane.org; Thu, 28 Jul 2011 18:56:07 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755796Ab1G1Qz7 (ORCPT ); Thu, 28 Jul 2011 12:55:59 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:59637 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755791Ab1G1Qz7 (ORCPT ); Thu, 28 Jul 2011 12:55:59 -0400 Received: by mail-yx0-f174.google.com with SMTP id 11so1647404yxi.19 for ; Thu, 28 Jul 2011 09:55:58 -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=8d7N5tbDifodAwTxRafShOR5nftG9L+NeRW4K/TpFQ4=; b=RTwSRg0liXEUpTDhnyZkci1vLlPJ7xRZL68glbuW+SivvyKi53awxE/jmaG1aFVeEk 2tM0LAlbDC34u0iYOxMjQgngcJgPgBSIrVAwteeVh0VsuK2u5NLYK/3cA+Mu8FuLumDa /ACsqVqmhYs40ynXvnC0HezvHUicgd2oaohRk= Received: by 10.42.156.3 with SMTP id x3mr159153icw.274.1311872158583; Thu, 28 Jul 2011 09:55:58 -0700 (PDT) Received: from localhost.localdomain ([203.110.240.41]) by mx.google.com with ESMTPS id ue1sm1497759icb.8.2011.07.28.09.55.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jul 2011 09:55:57 -0700 (PDT) X-Mailer: git-send-email 1.7.4.rc1.7.g2cf08.dirty In-Reply-To: <1311871951-3497-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.4.rc1.7.g2cf08.dirty