echo '{"status":"success","message":"Branch merged!"}'; } } else { echo '{"status":"error","message":"Missing parameter!"}'; } break; case 'push': if (isset($_GET['path']) && isset($_GET['remote']) && isset($_GET['branch'])) { echo $git->push(getWorkspacePath($_GET['path']), $_GET['remote'], $_GET['branch']); } else { echo '{"status":"error","message":"Missing parameter!"}'; } break; case 'pull': if (isset($_GET['path']) && isset($_GET['remote']) && isset($_GET['branch'])) { echo $git->pull(getWorkspacePath($_GET['path']), $_GET['remote'], $_GET['branch']); } else { echo '{"status":"error","message":"Missing parameter!"}'; } break; case 'rename': if (isset($_GET['path']) && isset($_GET['old_name']) && isset($_GET['new_name'])) { echo $git->renameItem(getWorkspacePath($_GET['path']), $_GET['old_name'], $_GET['new_name']); } else { echo '{"status":"error","message":"Missing parameter!"}'; } break; case 'numstat': if (isset($_GET['path'])) { $result = $git->numstat(getWorkspacePath($_GET['path'])); if ($result !== false) {