]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Handles an issue in windows with large code bases not squash merging correctly.
authorJames Rhodes <jrhodes@redpointsoftware.com.au>
Wed, 21 May 2014 00:15:31 +0000 (10:15 +1000)
committerJames Rhodes <jrhodes@redpointsoftware.com.au>
Wed, 21 May 2014 00:15:31 +0000 (10:15 +1000)
Summary: Handles an issue in windows with large code bases not squash merging correctly, this only catches the issue it doesn't really do any recovery.

Test Plan: We have been running this change in our work environment, it's a hard bug to replicate but when it has reared it's head this has caught it.

Reviewers: waynea, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, hach-que

Maniphest Tasks: T4884

Differential Revision: https://secure.phabricator.com/D8729

src/workflow/ArcanistLandWorkflow.php

index 55a763ab02e91f489d37059a769ed8bf6d330727..55df534c67ee5314b6c4044278150cf97e5b3964 100644 (file)
@@ -191,7 +191,7 @@ EOTEXT
 
     if ($this->useSquash) {
       $this->rebase();
-      $this->squash();
+      $this->squash();      
     } else {
       $this->merge();
     }
@@ -936,6 +936,10 @@ EOTEXT
         $repository_api->execxLocal(
           'commit -F %s',
           $this->messageFile);
+        if (phutil_is_windows()) {
+          // Occasionally on large repositories on Windows, Git can exit with an unclean working copy here.  This prevents reverts from being pushed to the remote when this occurs.
+          $this->requireCleanWorkingCopy();
+        }
       } else if ($this->isHg) {
         // hg rebase produces a commit earlier as part of rebase
         if (!$this->useSquash) {