From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Subject: Handling commit change logs (was: [PATCH v3 13/15] cpufreq: Add cpufreq driver for Tegra124) Date: Wed, 20 Aug 2014 22:02:28 +0200 Message-ID: <53F4FED4.7060408@suse.de> References: <1408419205-10048-1-git-send-email-tuomas.tynkkynen@iki.fi> <1408419205-10048-14-git-send-email-tuomas.tynkkynen@iki.fi> <53F3A900.8010805@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-pm-owner@vger.kernel.org To: Javier Martinez Canillas Cc: Viresh Kumar , Tuomas Tynkkynen , Tuomas Tynkkynen , "linux-tegra@vger.kernel.org" , Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" , Stephen Warren , Thierry Reding , Peter De Schrijver , Prashant Gaikwad , Mike Turquette , "Rafael J. Wysocki" , Paul Walmsley , Vince Hsu , "devicetree@vger.kernel.org" List-Id: devicetree@vger.kernel.org Hi Javier, Am 20.08.2014 17:39, schrieb Javier Martinez Canillas: > As you already know when you apply a patch with git am, everything > that is between a line with 3 dashes line (---) and the actual diff i= s > omitted since that is where the generated diffstat is placed by git > format-patch. >=20 > We usually rely on that behavior to put there the history of a patch > or any information that we think that is useful for reviewers but is > not suitable to end in the commit message. Now that means that you > have to generate the patch and then manually edit it to add the > history there. >=20 > But since git am omits any text between the first "---" and the diff, > it means that you can add a "---" on your actual commit message and > anything that follows will be discarded by git am, that way you can > maintain your history on your commit message which is way less tediou= s > than manually editing patches. >=20 > So the second "---" from Tuomas patch is actually the one generated b= y > git format-patch but that gets discarded by git am just like any othe= r > text so it causes no harm when other apply the patches. >=20 > If this not the correct workflow and you have a better way to manage > this, I would love to know about it. One drawback of having --- in the commit message is that you can't cherry-pick but really need to use git-am for it to be stripped. I resorted to a scripted way of handling change logs: Per patch series = I maintain a shell script that after git-format-patch essentially runs sed -i "/---/ r /dev/stdin" $OUTDIR/0001-*.patch <