You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`./gradlew assembleAffectedAndroidTests` - assembles but does not run on device tests, useful when working with device labs
137
137
138
-
## SpecifiedBranchCommit vs SpecifiedBranchCommit2
138
+
## SpecifiedBranchCommit vs SpecifiedBranchCommitMergeBase
139
139
140
140
- SpecifiedBranchCommit using `git rev-parse` command for getting sha.
141
-
-SpecifiedBranchCommit2 using `git merge base` command for getting sha.
141
+
-SpecifiedBranchCommitMergeBase using `git merge base` command for getting sha.
142
142
143
143
What does it mean?
144
144
When we run any AMD command we compare the current branch with the specified parent branch. Consider an example when, during the development of our feature,
@@ -151,7 +151,7 @@ Suppose we have changed 6 files in our "feature" branch.
151
151
152
152
1. Behaviour of SpecifiedBranchCommit:
153
153
AMD will show the result that 15 files were affected. Because our branch is not updated (pull) and AMD will see our 6 files and 9 files that were merged by another developer.
154
-
2. Behaviour of SpecifiedBranchCommit2:
154
+
2. Behaviour of SpecifiedBranchCommitMergeBase:
155
155
AMD will show the result that 6 files were affected. And this is the correct behavior.
156
156
157
157
Hence, depends on your CI settings you have to configure AMD right.
Copy file name to clipboardExpand all lines: affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/commitshaproviders/CommitShaProvider.kt
Copy file name to clipboardExpand all lines: affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/commitshaproviders/SpecifiedBranchCommitMergeBase.kt
Copy file name to clipboardExpand all lines: affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleConfigurationTest.kt
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -173,24 +173,24 @@ class AffectedModuleConfigurationTest {
173
173
}
174
174
175
175
@Test
176
-
fun`WHEN compareFrom is set to SpecifiedBranchCommit2 AND specifiedBranch is set THEN return SpecifiedBranchCommit2`() {
assertThat(e.message).isEqualTo("The property configuration compareFrom must be one of the following: PreviousCommit, ForkCommit, SpecifiedBranchCommit, SpecifiedBranchCommit2")
244
+
assertThat(e.message).isEqualTo("The property configuration compareFrom must be one of the following: PreviousCommit, ForkCommit, SpecifiedBranchCommit, SpecifiedBranchCommitMergeBase")
Copy file name to clipboardExpand all lines: affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/commitshaproviders/CommitShaProviderTest.kt
Copy file name to clipboardExpand all lines: affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/commitshaproviders/SpecifiedBranchCommitMergeBaseTest.kt
0 commit comments