From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Packham Subject: Re: [RFC PATCHv2 1/2] am: add gitk patch format Date: Fri, 5 Sep 2014 10:47:39 +1200 Message-ID: References: <1409736919-22341-1-git-send-email-judge.packham@gmail.com> <1409782918-26133-1-git-send-email-judge.packham@gmail.com> <1409782918-26133-2-git-send-email-judge.packham@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: GIT To: Junio C Hamano X-From: git-owner@vger.kernel.org Fri Sep 05 00:47:44 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XPfoe-0001rF-Ck for gcvg-git-2@plane.gmane.org; Fri, 05 Sep 2014 00:47:44 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756082AbaIDWrk (ORCPT ); Thu, 4 Sep 2014 18:47:40 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:58604 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755358AbaIDWrj (ORCPT ); Thu, 4 Sep 2014 18:47:39 -0400 Received: by mail-pa0-f49.google.com with SMTP id kq14so20624818pab.8 for ; Thu, 04 Sep 2014 15:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DFg3ze8VMTvbxDcxvFPDgLdGcc5bA/l/JOxvEiOJNus=; b=qKlVZiSg4BUr2fh4hIR86tEA6gXv3qje2RHGv3CfU/xWla1ubPx2mfh7tt8aR6TPcF z0HpUt3th3a7XRYq5WMBTeuaA+Bv2bWDf7d4oMhsnYbGN5oa2ivB3xvjtYZW/6qPhdUy O2SEw5isqi49il4xfP2LGtRwrYjr4vvqefGit2Et9lGxUgAm6YlBMBzeqM11D5mvijSn hiW0T6aYJAb5EypMKJSYqamm8kjM5nAadrOHDHX4R0kWVEYbDbFyn2plQhfkuQDgkk5w efbHMTow4jNTE4ufAPjR5JzuMKem7VaG2zQqAp5Kkxc3yNsxGjJf92LudhHUHnYZvyjg K7ZA== X-Received: by 10.66.136.12 with SMTP id pw12mr12701289pab.71.1409870859318; Thu, 04 Sep 2014 15:47:39 -0700 (PDT) Received: by 10.70.36.6 with HTTP; Thu, 4 Sep 2014 15:47:39 -0700 (PDT) In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi Junio, On Fri, Sep 5, 2014 at 5:21 AM, Junio C Hamano wrote: > Chris Packham writes: > >> Another thing that I've since realised is that this 'gitk' format is >> also what you've get from git show or git log -p. So this is actually >> allowing (for better or worse) things like 'git show $sha1 | git am >> --patch-format=gitk'[*1*]. That may mean that we should call the >> format something else ("pretty" perhaps?) and note that this is what >> gitk, git show and some incantations of git log generate. > > I would not call it "pretty", because "--pretty" is merely a > short-hand to "--pretty=". > > The output format indents the log message text by four spaces for > human reading to make it stand out from the patch text, and not > meant for machine consumption. Fair enough. > I doubt that a patchset that does > not update mailinfo and mailsplit to extract information and to undo > the indentation could be a right solution. I've read this sentence a couple of times and I can't understand it. I get that you are against adding yet more special cases to 'git am' to handle patches that weren't generated by 'git format-patch'. Are you saying that this won't go in or that the solution should be implemented differently. > "am" itself should not > be mucking with the input files. > At the very least we need to drop the first line and replace "Author" with "From". Which would still leave the commit message indented. Something like the following allows the patch to be applied sed -e '1d' -e 's/^Author:/From:/'