* [BUG/TEST 0/2] bugs with cherry-pick renames
@ 2013-02-12 4:27 Stephen Boyd
2013-02-12 4:27 ` [BUG/TEST 1/2] t3501: Expose bug with cherry-pick into dirty trees w/ renames Stephen Boyd
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stephen Boyd @ 2013-02-12 4:27 UTC (permalink / raw)
To: git
I ran into these bugs the other day and didn't have time to
investigate further. So I wrote test cases for them instead.
Stephen Boyd (2):
t3501: Expose bug with cherry-pick into dirty trees w/ renames
t3501: Expose addinfo_cache error message in cherry-pick
t/t3501-revert-cherry-pick.sh | 60 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 4+ messages in thread
* [BUG/TEST 1/2] t3501: Expose bug with cherry-pick into dirty trees w/ renames
2013-02-12 4:27 [BUG/TEST 0/2] bugs with cherry-pick renames Stephen Boyd
@ 2013-02-12 4:27 ` Stephen Boyd
2013-02-12 4:27 ` [BUG/TEST 2/2] t3501: Expose addinfo_cache error message in cherry-pick Stephen Boyd
2013-03-04 18:48 ` [BUG/TEST 0/2] bugs with cherry-pick renames Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2013-02-12 4:27 UTC (permalink / raw)
To: git
I encountered this bug while doing some cherry-picking into a
dirty tree. In this case, the working tree was dirty with some
changes to a file that had been renamed. The change I wanted to
cherry-pick was made along another branch before the rename and
it matched a subset of my working tree modulo the file rename.
When I cherry-picked the change from the other branch without the
rename to my current branch with the rename, the change applied
cleanly and the dirty bits were committed but the other dirty
bits in the file were lost. Make this into a test to expose this
bug.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
t/t3501-revert-cherry-pick.sh | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index 6f489e2..eef4d8c 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -109,4 +109,32 @@ test_expect_success 'chery-pick on unborn branch' '
! test_cmp_rev initial HEAD
'
+test_expect_success 'cherry-pick on dirty rename should stay dirty' '
+ git checkout initial &&
+
+ for l in b c d e f g h i j k l m n o
+ do
+ echo $l$l$l$l$l$l$l$l$l
+ done >oops &&
+
+ test_tick &&
+ git add oops &&
+ git commit -m drop &&
+ git tag drop &&
+
+ git checkout initial &&
+ test_tick &&
+ git mv oops spoo &&
+ git commit -m rename3 &&
+ git tag rename3 &&
+
+ for l in b c d e f g h i j k m n o
+ do
+ echo $l$l$l$l$l$l$l$l$l
+ done >spoo &&
+
+ git cherry-pick drop &&
+ ! git diff --quiet
+'
+
test_done
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [BUG/TEST 2/2] t3501: Expose addinfo_cache error message in cherry-pick
2013-02-12 4:27 [BUG/TEST 0/2] bugs with cherry-pick renames Stephen Boyd
2013-02-12 4:27 ` [BUG/TEST 1/2] t3501: Expose bug with cherry-pick into dirty trees w/ renames Stephen Boyd
@ 2013-02-12 4:27 ` Stephen Boyd
2013-03-04 18:48 ` [BUG/TEST 0/2] bugs with cherry-pick renames Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2013-02-12 4:27 UTC (permalink / raw)
To: git
I encountered a mysterious error message while doing some
cherry-picking into a dirty tree. In this case, the working tree
was dirty with changes to two files that had been renamed, we'll
call them 'file and 'otherfile'. The change I wanted to
cherry-pick was made along a branch before the rename to 'file'.
When I cherry-picked the change from the other branch without the
rename to my current branch with the rename, the change applied
cleanly and the dirty bits were committed but a mysterious error
message was printed indicating something went wrong with the file
that was still dirty after the cherry-pick.
error: addinfo_cache failed for path 'otherfile'
I suspect this error message shouldn't be printed, so recreate
the problem in t3501 so that it can be fixed.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
t/t3501-revert-cherry-pick.sh | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index eef4d8c..522a9fd 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -137,4 +137,36 @@ test_expect_success 'cherry-pick on dirty rename should stay dirty' '
! git diff --quiet
'
+test_expect_success 'cherry-pick on dirty rename should not complain' '
+ git checkout initial &&
+
+ test_commit file1
+
+ for l in b c d e f g h i j k l m n o
+ do
+ echo $l$l$l$l$l$l$l$l$l
+ done >oops &&
+
+ test_tick &&
+ git add oops &&
+ git commit -m drop2 &&
+ git tag drop2 &&
+
+ git checkout file1 &&
+ test_tick &&
+ git mv oops spoo &&
+ git mv file1.t file2.t &&
+ git commit -m rename4 &&
+ git tag rename4 &&
+
+ echo file2 > file2.t &&
+ for l in b c d e f g h i j k m n o
+ do
+ echo $l$l$l$l$l$l$l$l$l
+ done >spoo &&
+
+ git cherry-pick drop2 2> errors &&
+ ! test -s errors
+'
+
test_done
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [BUG/TEST 0/2] bugs with cherry-pick renames
2013-02-12 4:27 [BUG/TEST 0/2] bugs with cherry-pick renames Stephen Boyd
2013-02-12 4:27 ` [BUG/TEST 1/2] t3501: Expose bug with cherry-pick into dirty trees w/ renames Stephen Boyd
2013-02-12 4:27 ` [BUG/TEST 2/2] t3501: Expose addinfo_cache error message in cherry-pick Stephen Boyd
@ 2013-03-04 18:48 ` Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2013-03-04 18:48 UTC (permalink / raw)
To: git
On 02/11/13 20:27, Stephen Boyd wrote:
> I ran into these bugs the other day and didn't have time to
> investigate further. So I wrote test cases for them instead.
>
> Stephen Boyd (2):
> t3501: Expose bug with cherry-pick into dirty trees w/ renames
> t3501: Expose addinfo_cache error message in cherry-pick
>
> t/t3501-revert-cherry-pick.sh | 60 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 60 insertions(+)
>
Any comments? Anyone else running into these bugs?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-04 18:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 4:27 [BUG/TEST 0/2] bugs with cherry-pick renames Stephen Boyd
2013-02-12 4:27 ` [BUG/TEST 1/2] t3501: Expose bug with cherry-pick into dirty trees w/ renames Stephen Boyd
2013-02-12 4:27 ` [BUG/TEST 2/2] t3501: Expose addinfo_cache error message in cherry-pick Stephen Boyd
2013-03-04 18:48 ` [BUG/TEST 0/2] bugs with cherry-pick renames Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).