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

Re: [PATCH] rebase with preserve merges should not show merged commits

From
JSJörg Sommer <joerg@alea.gnuu.de>
Date
Mar 22, 2008, 15:37 UTC
Message-ID
<20080322153755.GA3498@alea.gnuu.de>
In-Reply-To
<20080322151234.GA19558@atjola.homenet>
Hallo Björn,
Björn Steinbrink schrieb am Sat 22. Mar, 16:12 (+0100):
Show 25 quoted lines
> On 2008.03.22 15:06:48 +0100, Jörg Sommer wrote:
> > Björn Steinbrink schrieb am Sat 22. Mar, 02:52 (+0100):
> > > On 2008.03.22 02:19:42 +0100, Jörg Sommer wrote:
> > > > The current version of git-rebase--interactive shows the user the commits
> > > > coming from a merge.
> > > > 
> > > > M---A---B
> > > >  \       \
> > > >   o---o---+---o branch
> > > > 
> > > > Rebasing branch on M with preserve merges gives the commits A and B. But
> > > > if you mark them for editing or remove them the rebase fails. You must
> > > > keep them as they are. It's useless to bother the user with these commits
> > > > and might lead to mistakes.
> > > 
> > > Uhm, why do you completely remove the possibility to edit A
> > 
> > Ahh, now I see what you've tried to say. I did add the option
> > --first-parent for rebase interactive *without* preserve merges, too.
> > I'll update my patch.
> 
> I didn't even look at it closely enough to notice that.
> --preserve-merges preserves the structure of the history. You seem to
> interpret it as to preserve the merges against the original parents,
> except for the first one,
Yes, exactly this is my intent.
> and that's simply not what it's meant to do.
That's a pity. So it's meant to be for such cases:
M---A---B
 \       \
  o---C---+---o branch
M---A---B
|    \
|     `-B'
 \       \
  o---C'--+---o branch
> I can see how that might be useful, but you'd have to add that as an
> additional mode of operation, and not break the normal one.

What's the intention of the patch that adds --first-parent somewhere that you've mentioned in the IRC?

I would like to send some tests for bugs I've seen. How do I correctly cleanup after rebase failed? It's necessary to not break following tests.

test_expect_failure '…' '
	…
	git rebase -i …
'
Should I do something like this:
test_expect_failure '…' '
	…
	if !git rebase -i …;
	then
		git rebase --abort;
		false
	fi
'
Bye, Jörg.
-- 
Manchmal denke ich, das sicherste Indiz dafür, daß anderswo im Universum
intelligentes Leben existiert, ist, daß niemand versucht hat, mit uns
Kontakt aufzunehmen.                           (Calvin und Hobbes)
Previous: Björn SteinbrinkNext: Jörg Sommer
Message 13 of 19 in “rebase with preserve merges should not show merged commits”
  1. rebase with preserve merges should not show merged commitsJörg Sommer, Mar 22, 2008
  2. Check for non‐foreign commits in rebase-interactive testJörg Sommer, Mar 22, 2008
  3. Handle fast forward correctly in rebase with preserve mergesJörg Sommer, Mar 22, 2008
  4. New tests to check rebase with preserve mergesJörg Sommer, Mar 22, 2008
  5. Johannes SchindelinMar 22, 2008
  6. Jörg SommerMar 22, 2008
  7. Johannes SchindelinMar 22, 2008
  8. Björn SteinbrinkMar 22, 2008
  9. Jörg SommerMar 22, 2008
  10. Björn SteinbrinkMar 22, 2008
  11. Jörg SommerMar 22, 2008
  12. Björn SteinbrinkMar 22, 2008
  13. Jörg SommerMar 22, 2008
  14. 1/5 rebase with preserve merges should not show merged commitsJörg Sommer, Mar 22, 2008
  15. 2/5 New test: no merges without preserve mergesJörg Sommer, Mar 22, 2008
  16. 3/5 Check for non‐foreign commits in rebase-interactive testJörg Sommer, Mar 22, 2008
  17. 4/5 Handle fast forward correctly in rebase with preserve mergesJörg Sommer, Mar 22, 2008
  18. 5/5 New tests to check rebase with preserve mergesJörg Sommer, Mar 22, 2008
  19. Johannes SchindelinMar 22, 2008

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.