@@ -485,6 +485,20 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository, mergeStyle
485
485
return fmt .Errorf ("git config [core.sparsecheckout -> true]: %v" , errbuf .String ())
486
486
}
487
487
488
+ // Stop LFS from running its filters
489
+ if err := git .NewCommand ("config" , "--local" , "filter.lfs.clean" , "" ).RunInDirPipeline (tmpBasePath , nil , & errbuf ); err != nil {
490
+ return fmt .Errorf ("git config [filter.lfs.clean -> \" \" ]: %v" , errbuf .String ())
491
+ }
492
+ if err := git .NewCommand ("config" , "--local" , "filter.lfs.smudge" , "" ).RunInDirPipeline (tmpBasePath , nil , & errbuf ); err != nil {
493
+ return fmt .Errorf ("git config [filter.lfs.smudge -> \" \" ]: %v" , errbuf .String ())
494
+ }
495
+ if err := git .NewCommand ("config" , "--local" , "filter.lfs.process" , "" ).RunInDirPipeline (tmpBasePath , nil , & errbuf ); err != nil {
496
+ return fmt .Errorf ("git config [filter.lfs.process -> \" \" ]: %v" , errbuf .String ())
497
+ }
498
+ if err := git .NewCommand ("config" , "--local" , "filter.lfs.required" , "false" ).RunInDirPipeline (tmpBasePath , nil , & errbuf ); err != nil {
499
+ return fmt .Errorf ("git config [filter.lfs.required -> false]: %v" , errbuf .String ())
500
+ }
501
+
488
502
// Read base branch index
489
503
if err := git .NewCommand ("read-tree" , "HEAD" ).RunInDirPipeline (tmpBasePath , nil , & errbuf ); err != nil {
490
504
return fmt .Errorf ("git read-tree HEAD: %s" , errbuf .String ())
0 commit comments