From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Narebski Subject: Re: Generating patches/Cherry Picking for a large number of commits Date: Fri, 28 Aug 2009 13:34:36 -0700 (PDT) Message-ID: References: <20090828194556.GA13302@coredump.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jeff King , git To: Alydis X-From: git-owner@vger.kernel.org Fri Aug 28 22:34:48 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mh89n-00014u-AC for gcvg-git-2@lo.gmane.org; Fri, 28 Aug 2009 22:34:47 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbZH1Ueh (ORCPT ); Fri, 28 Aug 2009 16:34:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753170AbZH1Ueh (ORCPT ); Fri, 28 Aug 2009 16:34:37 -0400 Received: from mail-fx0-f217.google.com ([209.85.220.217]:64031 "EHLO mail-fx0-f217.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753144AbZH1Ueg (ORCPT ); Fri, 28 Aug 2009 16:34:36 -0400 Received: by fxm17 with SMTP id 17so1782316fxm.37 for ; Fri, 28 Aug 2009 13:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:to:cc:subject:references:from:date :in-reply-to:message-id:lines:user-agent:mime-version:content-type; bh=hZZT2Ja5EZgswGlc+hZ43pzIk2ngyhZHAKKEawU6i+8=; b=dvBh0WcmVoStFvX/8Qnh0FhZUDkQDpFN8H1lbyE1WPyKupgGia90MjZVLoQF9qF7FA 13YrhQCa2tEj4Hs0oMfECvkhRqTeNbe593WuNUxsf0nkOJb2T07Jnrcghvtg2eHDsa4Y rxzpzKPm9u+UsIr60qgODLjjGx948VDmx5lt4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:to:cc:subject:references:from:date :in-reply-to:message-id:lines:user-agent:mime-version:content-type; b=m1o8A3QoPXf+x/H1OfPEFKdZlkPo2Uh9T/uEqA7uNLMH3ncf1QjTl9GYFoQIvqui3D VdqzLNBy1IkbCsJBusBES2JePEeugY3JkD4QiA9duy9GhBY+oPXjoWTeeycEmt5aGpmA upHdyvB0KMWVMn5vMridWr9WHOv756eKb3RHQ= Received: by 10.204.151.210 with SMTP id d18mr1258500bkw.203.1251491677610; Fri, 28 Aug 2009 13:34:37 -0700 (PDT) Received: from localhost.localdomain (abvl130.neoplus.adsl.tpnet.pl [83.8.209.130]) by mx.google.com with ESMTPS id 22sm1774942fkq.23.2009.08.28.13.34.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 Aug 2009 13:34:36 -0700 (PDT) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.13.4/8.13.4) with ESMTP id n7SKYYok030337; Fri, 28 Aug 2009 22:34:35 +0200 Received: (from jnareb@localhost) by localhost.localdomain (8.13.4/8.13.4/Submit) id n7SKYUDw030334; Fri, 28 Aug 2009 22:34:30 +0200 X-Authentication-Warning: localhost.localdomain: jnareb set sender to jnareb@gmail.com using -f In-Reply-To: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: [Alydis, please do not toppost] Alydis writes: > On Fri, Aug 28, 2009 at 2:45 PM, Jeff King wrote: >> On Fri, Aug 28, 2009 at 02:26:43PM -0500, Alydis wrote: >> >>> I've tried something along these lines: >>> [...] >>> git format-patch -o patches v2.6.21..v2.6.30 arch/powerpc/boot >>> git am -3 patches/* >>> >>> But, to my dismay, format-patch here tears apart the commits and >>> applies ONLY the hunks that apply to the arch/powerpc/boot directory. >>> What I'd much rather do is obtain a list of commits that apply to >>> arch/powerpc/boot; but, then apply the entire patch. >> >> By default, format-patch (and log, gitk, etc) when given a path limiter >> will also limit the diff shown. You can override it with --full-diff. > > Ack! Embarrassing RTFM. > > While I have your attention, however, I noticed that git am > will apply the list patches generated by format-patch. The > documentation said something about mbox/maildir directories, which I > actually am not that familiar with. Is it safe to say that git am > will read the path and apply patches in numerical order? git-format-patch | git-am pipeline has to work correctly, as it originally was the way (modulo extra options) git-rebase was implemented. So yes, "git am " should understand and apply in correct order result of "git format-patch -o ". > Does it allow skipping? There is "git am -i". -- Jakub Narebski Poland ShadeHawk on #git