File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 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(
150150        } 
151151    } ; 
152152
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. 
153160    git. args ( [ 
154161        "rev-list" , 
155162        & format ! ( "--author={}" ,  config. git_merge_commit_email) , 
156163        "-n1" , 
157-         "--first-parent" , 
164+         "--diff-merges= first-parent" , 
158165        & merge_base, 
159166    ] ) ; 
160167
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments