getPath(); // Prepare an empty repo (new ShipItShellCommand($path, 'git', 'init'))->runSynchronously(); (new ShipItShellCommand( $path, 'git', 'config', 'user.name', 'FBShipIt Unit Test', ))->runSynchronously(); (new ShipItShellCommand( $path, 'git', 'config', 'user.email', 'fbshipit@example.com', ))->runSynchronously(); // Add a tracked commit $fake_commit_id = bin2hex(random_bytes(16)); $message = ShipItSync::addTrackingData( (new ShipItChangeset())->withID($fake_commit_id) )->getMessage(); (new ShipItShellCommand( $path, 'git', 'commit', '--allow-empty', '-m', $message, ))->runSynchronously(); $repo = new ShipItRepoGIT($path, 'master'); $this->assertSame($fake_commit_id, $repo->findLastSourceCommit(ImmSet { })); } }