{"thread":{"id":"32884","subject":"[BUG/TEST 2/2] t3501: Expose addinfo_cache error message in cherry-pick","startedAt":"2013-02-12T04:27:40Z","lastAt":"2013-03-04T18:48:52Z","messageCount":4,"participants":["Stephen Boyd"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"209332","messageId":"1360643262-1472-1-git-send-email-sboyd@codeaurora.org","threadId":"32884","inReplyTo":null,"subject":"[BUG/TEST 0/2] bugs with cherry-pick renames","fromName":"Stephen Boyd","fromEmail":"sboyd@codeaurora.org","sentAt":"2013-02-12T04:27:40Z","receivedAt":"2013-02-12T04:27:40Z","isPatch":false,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"I ran into these bugs the other day and didn't have time to \ninvestigate further. So I wrote test cases for them instead.\n\nStephen Boyd (2):\n  t3501: Expose bug with cherry-pick into dirty trees w/ renames\n  t3501: Expose addinfo_cache error message in cherry-pick\n\n t/t3501-revert-cherry-pick.sh | 60 +++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 60 insertions(+)\n\n-- \nThe Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\nhosted by The Linux Foundation\n"},{"id":"209333","messageId":"1360643262-1472-2-git-send-email-sboyd@codeaurora.org","threadId":"32884","inReplyTo":"1360643262-1472-1-git-send-email-sboyd@codeaurora.org","subject":"[BUG/TEST 1/2] t3501: Expose bug with cherry-pick into dirty trees w/ renames","fromName":"Stephen Boyd","fromEmail":"sboyd@codeaurora.org","sentAt":"2013-02-12T04:27:41Z","receivedAt":"2013-02-12T04:27:41Z","isPatch":false,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"I encountered this bug while doing some cherry-picking into a\ndirty tree. In this case, the working tree was dirty with some\nchanges to a file that had been renamed. The change I wanted to\ncherry-pick was made along another branch before the rename and\nit matched a subset of my working tree modulo the file rename.\nWhen I cherry-picked the change from the other branch without the\nrename to my current branch with the rename, the change applied\ncleanly and the dirty bits were committed but the other dirty\nbits in the file were lost. Make this into a test to expose this\nbug.\n\nSigned-off-by: Stephen Boyd <sboyd@codeaurora.org>\n---\n t/t3501-revert-cherry-pick.sh | 28 ++++++++++++++++++++++++++++\n 1 file changed, 28 insertions(+)\n\ndiff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh\nindex 6f489e2..eef4d8c 100755\n--- a/t/t3501-revert-cherry-pick.sh\n+++ b/t/t3501-revert-cherry-pick.sh\n@@ -109,4 +109,32 @@ test_expect_success 'chery-pick on unborn branch' '\n \t! test_cmp_rev initial HEAD\n '\n \n+test_expect_success 'cherry-pick on dirty rename should stay dirty' '\n+\tgit checkout initial &&\n+\n+\tfor l in b c d e f g h i j k l m n o\n+\tdo\n+\t\techo $l$l$l$l$l$l$l$l$l\n+\tdone >oops &&\n+\n+\ttest_tick &&\n+\tgit add oops &&\n+\tgit commit -m drop &&\n+\tgit tag drop &&\n+\n+\tgit checkout initial &&\n+\ttest_tick &&\n+\tgit mv oops spoo &&\n+\tgit commit -m rename3 &&\n+\tgit tag rename3 &&\n+\n+\tfor l in b c d e f g h i j k m n o\n+\tdo\n+\t\techo $l$l$l$l$l$l$l$l$l\n+\tdone >spoo &&\n+\n+\tgit cherry-pick drop &&\n+\t! git diff --quiet\n+'\n+\n test_done\n-- \nThe Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\nhosted by The Linux Foundation\n"},{"id":"209331","messageId":"1360643262-1472-3-git-send-email-sboyd@codeaurora.org","threadId":"32884","inReplyTo":"1360643262-1472-1-git-send-email-sboyd@codeaurora.org","subject":"[BUG/TEST 2/2] t3501: Expose addinfo_cache error message in cherry-pick","fromName":"Stephen Boyd","fromEmail":"sboyd@codeaurora.org","sentAt":"2013-02-12T04:27:42Z","receivedAt":"2013-02-12T04:27:42Z","isPatch":false,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"I encountered a mysterious error message while doing some\ncherry-picking into a dirty tree. In this case, the working tree\nwas dirty with changes to two files that had been renamed, we'll\ncall them 'file and 'otherfile'. The change I wanted to\ncherry-pick was made along a branch before the rename to 'file'.\nWhen I cherry-picked the change from the other branch without the\nrename to my current branch with the rename, the change applied\ncleanly and the dirty bits were committed but a mysterious error\nmessage was printed indicating something went wrong with the file\nthat was still dirty after the cherry-pick.\n\n\terror: addinfo_cache failed for path 'otherfile'\n\nI suspect this error message shouldn't be printed, so recreate\nthe problem in t3501 so that it can be fixed.\n\nSigned-off-by: Stephen Boyd <sboyd@codeaurora.org>\n---\n t/t3501-revert-cherry-pick.sh | 32 ++++++++++++++++++++++++++++++++\n 1 file changed, 32 insertions(+)\n\ndiff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh\nindex eef4d8c..522a9fd 100755\n--- a/t/t3501-revert-cherry-pick.sh\n+++ b/t/t3501-revert-cherry-pick.sh\n@@ -137,4 +137,36 @@ test_expect_success 'cherry-pick on dirty rename should stay dirty' '\n \t! git diff --quiet\n '\n \n+test_expect_success 'cherry-pick on dirty rename should not complain' '\n+\tgit checkout initial &&\n+\n+\ttest_commit file1\n+\n+\tfor l in b c d e f g h i j k l m n o\n+\tdo\n+\t\techo $l$l$l$l$l$l$l$l$l\n+\tdone >oops &&\n+\n+\ttest_tick &&\n+\tgit add oops &&\n+\tgit commit -m drop2 &&\n+\tgit tag drop2 &&\n+\n+\tgit checkout file1 &&\n+\ttest_tick &&\n+\tgit mv oops spoo &&\n+\tgit mv file1.t file2.t &&\n+\tgit commit -m rename4 &&\n+\tgit tag rename4 &&\n+\n+\techo file2 > file2.t &&\n+\tfor l in b c d e f g h i j k m n o\n+\tdo\n+\t\techo $l$l$l$l$l$l$l$l$l\n+\tdone >spoo &&\n+\n+\tgit cherry-pick drop2 2> errors &&\n+\t! test -s errors\n+'\n+\n test_done\n-- \nThe Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\nhosted by The Linux Foundation\n"},{"id":"210584","messageId":"5134EC94.6010602@quicinc.com","threadId":"32884","inReplyTo":"1360643262-1472-1-git-send-email-sboyd@codeaurora.org","subject":"Re: [BUG/TEST 0/2] bugs with cherry-pick renames","fromName":"Stephen Boyd","fromEmail":"sboyd@quicinc.com","sentAt":"2013-03-04T18:48:52Z","receivedAt":"2013-03-04T18:48:52Z","isPatch":false,"sender":{"key":"sboyd@quicinc.com","avatar":null},"body":"On 02/11/13 20:27, Stephen Boyd wrote:\n> I ran into these bugs the other day and didn't have time to \n> investigate further. So I wrote test cases for them instead.\n>\n> Stephen Boyd (2):\n>   t3501: Expose bug with cherry-pick into dirty trees w/ renames\n>   t3501: Expose addinfo_cache error message in cherry-pick\n>\n>  t/t3501-revert-cherry-pick.sh | 60 +++++++++++++++++++++++++++++++++++++++++++\n>  1 file changed, 60 insertions(+)\n>\n\nAny comments? Anyone else running into these bugs?\n"}]}