git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] git-publish

From
Fredrik Kuivinen <freku045@student.liu.se>
Date
Aug 13, 2006, 19:42 UTC
Message-ID
<20060813194256.GB5205@c165.ib.student.liu.se>
In-Reply-To
<20060813191346.GA21487@mars.ravnborg.org>
On Sun, Aug 13, 2006 at 09:13:46PM +0200, Sam Ravnborg wrote:
Show 18 quoted lines
> On Sun, Aug 13, 2006 at 12:34:49PM -0400, Daniel Barkalow wrote:
> > 
> > Actually, I'm also curious as to how other people generate the series of 
> > commits for a patch series, when they've actually got a working directory 
> > that contains the end result. I doubt that people actually do their 
> > modifications in patch order, committing each time, without writing 
> > and testing the end result.
> hack hack
> git commit -a
> test <= ohh crap a trivial bug
> git format-patch HEAD^..HEAD
> git reset HEAD^ --hard
> patch -p1 0001*
> hack hack
> git commit -a <= reading in old changelog from 0001*
> 
> The above is easier if you know git I expect.
> If I find bugs in older patches I just go back more steps.

If it is the top commit you want to change it is possible to do so with the '--amend' option to git commit. Instead of the sequence of commands above you can just do:

    hack hack
    git commit -a
    test <= trivial bug
    hack hack
    git commit -a --amend
It wont work if you find bugs in older patches though.
Show 9 quoted lines
> 
> I often (twice or more for each kernel release) throw away my kbuild.git
> tree and start all over.
> That gives me a recent kernel to work with and still providing Linux
> with a linar history.
> 
> I have considered stgit - but have not tried it. The above works pretty
> well for me (my fingers and my logic i accused to it now) so the
> incentive to shift is small.

I really like stgit. IMHO it is much easier to use stgit when preparing a patch series compared to git itself. Maybe it is because I never got used to the sequence of commands you described above.

- Fredrik
Previous: Sam RavnborgNext: Daniel Barkalow
Message 6 of 14 in “[RFC] git-publish”
  1. Daniel BarkalowAug 13, 2006
  2. Junio C HamanoAug 13, 2006
  3. Johannes SchindelinAug 13, 2006
  4. Junio C HamanoAug 13, 2006
  5. Sam RavnborgAug 13, 2006
  6. Fredrik KuivinenAug 13, 2006
  7. Daniel BarkalowAug 13, 2006
  8. Sam RavnborgAug 13, 2006
  9. Alex RiesenAug 14, 2006
  10. Shawn PearceAug 14, 2006
  11. Junio C HamanoAug 14, 2006
  12. Jeff KingAug 14, 2006
  13. Martin LanghoffAug 13, 2006
  14. Petr BaudisSep 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.