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

Re: rebase -p confusion in 1.6.1

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 15, 2009, 13:58 UTC
Message-ID
<alpine.DEB.1.00.0901151448120.3586@pacific.mpi-cbg.de>
In-Reply-To
<20090115133808.GA10045@leksak.fem-net>
Hi,
On Thu, 15 Jan 2009, Stephan Beyer wrote:
Show 15 quoted lines
> Hmm, you are rebasing onto master which is merged into the branch you 
> want to rebase. So, I think the correct output should be the same like 
> git rebase without -p, ie
> 
> * 1337bee... (refs/heads/work) b4
> * deadbee... b3
> * badbeef... b2
> * fa1afe1... b1
> * 0153c27... (refs/heads/master) a4
> * 74f4387... a3
> * b37ae36... a2
> * ed1e1bc... a1
> 
> This is because master is already merged into work and a preserved
> merge will see that everything is already merged in.

I guess the problem is that the list shown in the editor says 'noop'. This does not happen without -p, so something is borked in the commit listing with -p.

Which is no wonder: the code after line 652 in git-rebase--interactive.sh that handles -p is utterly incomprehensible.

Remember: there is code that is so simple that it has no obvious flaws, 
and there is code that is so complicated that it has no obvious flaws.

IMO (and I said so much back then), it was the biggest mistake of the whole patch series that it was so intrusive and changed everything. It's not like I did not warn anybody.

The point is: you could _easily_ handle -p with _almost the same_ rev-list command; you'd just have to make sure that --no-merges is skipped.

And then you only have to make sure that the current commit is the (possibly rewritten version of the) first parent of the next commit to pick.

Ciao, Dscho

Previous: Stephan BeyerNext: Sitaram Chamarty
Message 7 of 28 in “rebase -p confusion in 1.6.1”
  1. Sitaram ChamartyJan 15, 2009
  2. Johannes SchindelinJan 15, 2009
  3. Sitaram ChamartyJan 15, 2009
  4. Stephan BeyerJan 15, 2009
  5. Sitaram ChamartyJan 15, 2009
  6. Stephan BeyerJan 15, 2009
  7. Johannes SchindelinJan 15, 2009
  8. Sitaram ChamartyJan 15, 2009
  9. Michael J GruberJan 15, 2009
  10. Stephan BeyerJan 15, 2009
  11. Michael J GruberJan 15, 2009
  12. Johannes SchindelinJan 15, 2009
  13. Michael J GruberJan 15, 2009
  14. Johannes SchindelinJan 15, 2009
  15. Sitaram ChamartyJan 15, 2009
  16. Johannes SchindelinJan 15, 2009
  17. Sitaram ChamartyJan 15, 2009
  18. Michael J GruberJan 15, 2009
  19. Johannes SchindelinJan 15, 2009
  20. Stephan BeyerJan 15, 2009
  21. Johannes SchindelinJan 15, 2009
  22. Sitaram ChamartyJan 15, 2009
  23. Johannes SchindelinJan 17, 2009
  24. Johannes SchindelinJan 17, 2009
  25. Stephen HabermanJan 18, 2009
  26. Johannes SchindelinJan 18, 2009
  27. Stephen HabermanJan 18, 2009
  28. Stephen HabermanJan 18, 2009

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.