{"thread":{"id":"3981","subject":"[PATCH] Add a test case for rerere","startedAt":"2006-04-28T07:56:05Z","lastAt":"2006-04-28T08:02:56Z","messageCount":2,"participants":["Uwe Zeisberger"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"19216","messageId":"20060428075604.GA30714@digi.com","threadId":"3981","inReplyTo":null,"subject":"[PATCH] Add a test case for rerere","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-04-28T07:56:05Z","receivedAt":"2006-04-28T07:56:05Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Currently this test fails because rerere is not able to record\nresolves for a file that don't exist in the merge base but in\nboth branches to merge.\n\nSigned-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>\n\n---\n\n t/t8003-rerere.sh |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 66 insertions(+), 0 deletions(-)\n create mode 100644 t/t8003-rerere.sh\n\nIt's the last command that fails because rerere didn't record the\nconflict between branch1:file-common and master:file-common.\n\nPlease feel free to change the filename as I don't know/see the naming\nscheme of the tests.\n\nBest regards\nUwe\n\nff012a80cafa3fe905de72d0db8b616ff76d0038\ndiff --git a/t/t8003-rerere.sh b/t/t8003-rerere.sh\nnew file mode 100644\nindex 0000000..1bb66ff\n--- /dev/null\n+++ b/t/t8003-rerere.sh\n@@ -0,0 +1,66 @@\n+#!/bin/sh\n+\n+test_description='git-rerere'\n+. ./test-lib.sh\n+\n+\n+test_expect_success 'prepare repository' \\\n+'mkdir .git/rr-cache &&\n+echo \"content\" > file-base &&\n+git add file-base &&\n+git commit -m \"Initial commit\" &&\n+git branch branch &&\n+echo \"added after branch\" >> file-base &&\n+echo \"added after branch\" >> file-common &&\n+git add file-common &&\n+git commit -m \"master1\" -i file-base file-common &&\n+git checkout branch &&\n+echo \"added in branch\" >> file-base &&\n+echo \"only in branch\" > file-branch &&\n+echo \"added in branch\" >> file-common &&\n+git add file-branch file-common &&\n+git commit -m \"branch1\" -i file-base file-branch file-common &&\n+git branch branch1'\n+\n+test_expect_failure 'pull master' \\\n+'git pull . master'\n+\n+cat >> file-base-expect << EOF\n+content\n+<<<<<<< HEAD/file-base\n+added in branch\n+=======\n+added after branch\n+>>>>>>> `git rev-parse master`/file-base\n+EOF\n+\n+test_expect_success 'merge result' \\\n+'cmp file-base file-base-expect &&\n+git cat-file blob HEAD:file-common | cmp file-common~HEAD - &&\n+git cat-file blob master:file-common | cmp file-common~`git rev-parse master` - &&\n+git cat-file blob HEAD:file-branch | cmp file-branch -'\n+\n+test_expect_success 'record and resolve confilcts' \\\n+'git rerere &&\n+echo \"content\n+added in branch\n+added after branch\" > file-base &&\n+echo \"added in branch\n+added after branch\" > file-common &&\n+git rerere &&\n+git-ls-files -o | xargs rm &&\n+git commit -m \"resolved conflicts\" -i file-base file-common file-branch &&\n+git-checkout master\n+'\n+ \n+test_expect_failure 'pull branch1' \\\n+'git pull . branch1'\n+\n+test_expect_success 'reuse recorded resolve' \\\n+'git rerere &&\n+git cat-file blob branch:file-branch | cmp file-branch - &&\n+git cat-file blob branch:file-base | cmp file-base - &&\n+git cat-file blob branch:file-common | cmp file-common -'\n+\n+test_done\n+\n-- \n1.3.1.gac92\n\n\n-- \nUwe Zeisberger\nFS Forth-Systeme GmbH, A Digi International Company\nKueferstrasse 8, D-79206 Breisach, Germany\nPhone: +49 (7667) 908 0 Fax: +49 (7667) 908 200\nWeb: www.fsforth.de, www.digi.com\n"},{"id":"19217","messageId":"20060428080256.GA1877@informatik.uni-freiburg.de","threadId":"3981","inReplyTo":"20060428075604.GA30714@digi.com","subject":"Re: [PATCH] Add a test case for rerere","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-04-28T08:02:56Z","receivedAt":"2006-04-28T08:02:56Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nUwe Zeisberger wrote:\n> +echo \"added in branch\" >> file-common &&\n> +git add file-branch file-common &&\n> +git commit -m \"branch1\" -i file-base file-branch file-common &&\n> +git branch branch1'\n> +\n> ...\n> + \n> +test_expect_failure 'pull branch1' \\\n> +'git pull . branch1'\n\nWhen typing the test I first tried to pull branch^, but this failed with\n\"no such remote ref refs/heads/branch^\".  Is it intended that one can\nonly pull branches and not any rev?\n\nBest regards\nUwe\n\nPS: I added a double blank line in the file.  Sorry for that...\n\n-- \nUwe Zeisberger\n\nhttp://www.google.com/search?q=Planck%27s+constant%3D\n"}]}