From: Masahiro Yamada Date: Wed, 04 Jun 2014 17:32:24 +0900 Subject: [U-Boot] [Patman Bug Report] Patman breaks git-log during git-rebase In-Reply-To: References: <20140602164441.7F88.AA925319@jp.panasonic.com> Message-ID: <20140604173224.9567.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Mon, 2 Jun 2014 20:28:48 -0600 Simon Glass wrote: > Hi Masahiro, > > On 2 June 2014 01:44, Masahiro Yamada wrote: > > Hi Simon, > > > > I found an odd behavior of Patman. > > > > If I run Patman during "git rebase -i", > > Patman rewrites git-log, stripping all the Patman-tags. > > (I lost some important tags such as "Series-changes".) > > > > I think git-log should be read-only during Patman operation. > > I can't understand why Patman needs to directly edit git-log. > > Is this a fixable problem? > > Probably you shouldn't do that. For me patman normally complains that > it can't find patches to process, and stops. > > Can you give me the repeat steps? I think I have seen this before but > I'm not sure how to make it. > > Also, patman never edits commits. I wonder if patman is moving you to > the wrong commit somehow. Try 'git reflog' to find something to get > back to. Please try this procedure: [1] Let's start our topic branch git checkout -b test master [2] Add some commits on the topic branch echo a >> README git add README git commit Input the commit message like this: ----->8----- Test commit 1 This is log. Blah Blah. Series-to: u-boot at lists.denx.de Series-version: 2 Series-changes: 2 - Blah Blah -----8<----- echo b >> README git add README git commit -m "Test commit 2" [3] Now we have two commits on the branch. Git-log is like this git log commit cedf7627e215135b594cd40b87b8f4a9b80375a6 Author: Masahiro Yamada Date: Wed Jun 4 17:15:55 2014 +0900 Test commit 2 commit 74a2b72c0d4201fc478e530b886c3ab3791a703e Author: Masahiro Yamada Date: Wed Jun 4 17:04:57 2014 +0900 Test commit 1 This is log. Blah Blah. Series-to: u-boot at lists.denx.de Series-version: 2 Series-changes: 2 - Blah Blah [4] Run "git rebase -i" git rebase -i master [5] Edit the first one e 74a2b72 test commit 1 pick cedf762 Test commit 2 [6] Run "git commit --amend" and edit the git-log git commit --amend Test commit 1 This is log. Blah Blah. Some additional log. <----- Add Series-to: u-boot at lists.denx.de Series-version: 2 Series-changes: 2 - Blah Blah [7] Run patman tools/patman/patman -t -c 1 [8] Cansel the patman and check the git-log and you will find Patman tags are gone!! git log commit 7bfec19aebaaefba9f7062e909fa38c071191b71 Author: Masahiro Yamada Date: Wed Jun 4 17:04:57 2014 +0900 Test commit 1 This is log. Blah Blah. Some additional log. Signed-off-by: Masahiro Yamada Best Regards Masahiro Yamada