function initialize(driver) {
    const repoState = RepositoryState.createEmpty();
    return fetchBranches(repoState, driver)
    .then((repoState) => {
        const branches = repoState.getBranches();
        const master = branches.find(function isMaster(branch) {
            return branch.getFullName() === 'master';
        });
        const branch = master || branches.first();

        return fetchTree(repoState, driver, branch)
        .then((repoState) => {
            return checkout(repoState, branch);
        });
    });
}
function initialize(driver) {
    const repoState = RepositoryState.createEmpty();
    return fetchBranches(repoState, driver)
    .then((repoState) => {
        const branches = repoState.getBranches();
        const master = branches.find(function isMaster(branch) {
            return branch.getFullName() === 'master';
        });
        const branch = master || branches.first();

        return fetchTree(repoState, driver, branch)
        .then((repoState) => {
            return checkout(repoState, branch);
        });
    });
}
function initialize ( driver ) { const repoState = RepositoryState . createEmpty ( ) ; return fetchBranches ( repoState , driver ) . then ( ( repoState ) => { const branches = repoState . getBranches ( ) ; const master = branches . find ( function isMaster ( branch ) { return branch . getFullName ( ) === 'master' ; } ) ; const branch = master || branches . first ( ) ; return fetchTree ( repoState , driver , branch ) . then ( ( repoState ) => { return checkout ( repoState , branch ) ; } ) ; } ) ; }
Initialize a new RepositoryState from the repo of a Driver. Fetch
the branches, and checkout master or the first available branch.
@param {Driver} driver
@return {Promise<RepositoryState>}
Initialize a new RepositoryState from the repo of a Driver . Fetch the branches and checkout master or the first available branch .