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:34 UTC
Message-ID
<alpine.DEB.1.00.0901151429440.3586@pacific.mpi-cbg.de>
In-Reply-To
<slrngmu4j5.e1u.sitaramc@sitaramc.homelinux.net>
Hi,
On Thu, 15 Jan 2009, Sitaram Chamarty wrote:
Show 5 quoted lines
> While trying to understand "rebase -p", I came across some
> very unexpected behaviour that made me throw in the towel
> and ask for help!
>
> [... some script with some aliases ...]

I turned this into a proper test case (to show what would be most helpful if you report bugs like this in the future).

If nobody beats me to it, I'll work on it tonight.
-- snipsnap --
 t/t3409-rebase-preserve-merges.sh |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh
index e6c8327..5e2128c 100755
--- a/t/t3409-rebase-preserve-merges.sh
+++ b/t/t3409-rebase-preserve-merges.sh
@@ -92,4 +92,32 @@ test_expect_success '--continue works after a conflict' '
 	)
 '
 
+test_commit () {
+	: > "$1" &&
+	git add "$1" &&
+	test_tick &&
+	git commit -m "$1" "$1"
+}
+
+test_expect_success 'test case from Sitaram' '
+
+	git checkout master &&
+	test_commit a1 &&
+	git checkout -b work &&
+	test_commit b1 &&
+	git checkout master &&
+	test_commit a3 &&
+	git checkout work &&
+	git merge master &&
+	test_commit b3 &&
+	echo before: &&
+	git log --graph --pretty=oneline --decorate --abbrev-commit &&
+	test -f b3 &&
+	git rebase -p master &&
+	echo after: &&
+	git log --graph --pretty=oneline --decorate --abbrev-commit &&
+	test -f b3
+
+'
+
 test_done
Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 2 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.