From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Nieder Subject: [RFC/PATCH] cherry-pick/revert: add support for -X/--strategy-option Date: Fri, 10 Dec 2010 18:51:44 -0600 Message-ID: <20101211005144.GA6634@burratino> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christian Couder , Justin Frankel , Bert Wesarg , Eyvind Bernhardsen , Kevin Ballard To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Sat Dec 11 01:52:15 2010 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 1PRDh7-0005Pz-LJ for gcvg-git-2@lo.gmane.org; Sat, 11 Dec 2010 01:52:13 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757360Ab0LKAwI (ORCPT ); Fri, 10 Dec 2010 19:52:08 -0500 Received: from mail-yw0-f46.google.com ([209.85.213.46]:57028 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756539Ab0LKAwG (ORCPT ); Fri, 10 Dec 2010 19:52:06 -0500 Received: by ywl5 with SMTP id 5so2414535ywl.19 for ; Fri, 10 Dec 2010 16:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=2yWdTyTRHOpoX/aDSunqzozfYOioxWOAAmbcXLeAnY8=; b=vqQHoU+oLs/hG6faexG1jZNwZJEP4ja2EGm9IubA5u0fl5By8VjbK2CXOfV9t5uBh4 Xf3C4gsz4F0vQRWbaV+i3+oeXEgKAgd5zsZpKUaUumoJtxdwVEJlRR1QbqAmf0uR5J4u MZCiOoaWzwoy4hIszzVCikl5I29bXBKeRjGFE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=wBGkg6x0mkjljoppE8OBvVJ5KutCNBqXU7vwbEIN3OLqqnXYp5MwLhuYLRybhGRiO0 9gXz2MPe5DP+r0RqP+JosZYK5XpfOHdndgDUtTvexTNei1wA8DKcnHxmJxl/WzNORJzV jeJU4LS+86Hjigw8d2b74EWRGu3PXv9ixXL9A= Received: by 10.150.97.1 with SMTP id u1mr2476787ybb.74.1292028725814; Fri, 10 Dec 2010 16:52:05 -0800 (PST) Received: from burratino (adsl-69-209-58-175.dsl.chcgil.ameritech.net [69.209.58.175]) by mx.google.com with ESMTPS id v4sm788340ybe.5.2010.12.10.16.52.02 (version=SSLv3 cipher=RC4-MD5); Fri, 10 Dec 2010 16:52:04 -0800 (PST) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: For example, this would allow cherry-picking or reverting patches from a piece of history with a different end-of-line style, like so: $ git revert -Xrenormalize old-problematic-commit Currently that is possible with manual use of merge-recursive but the cherry-pick/revert porcelain does not expose the functionality. While at it, document the existing support for --strategy. Signed-off-by: Jonathan Nieder --- Thoughts? Documentation/git-cherry-pick.txt | 32 ++++++++++++++++++++++++++++++++ Documentation/git-revert.txt | 10 ++++++++++ builtin/merge.c | 6 ++++-- builtin/revert.c | 29 ++++++++++++++++++++++------- contrib/examples/git-revert.sh | 13 ++++++++++++- merge-recursive.h | 4 +++- t/t3032-merge-recursive-options.sh | 14 ++++++++++++++ 7 files changed, 97 insertions(+), 11 deletions(-) diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 7300870..749d68a 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -79,6 +79,16 @@ effect to your index in a row. cherry-pick'ed commit, then a fast forward to this commit will be performed. +--strategy=:: + Use the given merge strategy. Should only be used once. + See the MERGE STRATEGIES section in linkgit:git-merge[1] + for details. + +-X