File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -150,11 +150,18 @@ pub fn get_closest_merge_commit(
150
150
}
151
151
} ;
152
152
153
+ // Now that rust-lang/rust is the only repo using bors, we can search the entire
154
+ // history for a bors commit, not just "first parents". This is crucial to make
155
+ // this logic work when the user has currently checked out a subtree sync branch.
156
+ // At the same time, we use this logic in CI where only a tiny part of the history
157
+ // is even checked out, making this kind of history search very fragile. It turns
158
+ // out that by adding `--diff-merges=first-parent`, we get a usable reply
159
+ // even for sparse checkouts: it will just return the most recent bors commit.
153
160
git. args ( [
154
161
"rev-list" ,
155
162
& format ! ( "--author={}" , config. git_merge_commit_email) ,
156
163
"-n1" ,
157
- "--first-parent" ,
164
+ "--diff-merges= first-parent" ,
158
165
& merge_base,
159
166
] ) ;
160
167
You can’t perform that action at this time.
0 commit comments