We don't need to return a repository here

This commit is contained in:
Markus Olsson 2020-11-27 14:14:48 +01:00
parent 1ec3818086
commit bea768a6e8
2 changed files with 5 additions and 5 deletions

View file

@ -3068,13 +3068,13 @@ export class AppStore extends TypedBaseStore<IAppState> {
name: string,
startPoint: string | null,
noTrackOption: boolean = false
): Promise<Repository> {
): Promise<void> {
const gitStore = this.gitStoreCache.get(repository)
const branch = await gitStore.createBranch(name, startPoint, noTrackOption)
return branch === null
? repository
: this._checkoutBranch(repository, branch)
if (branch !== null) {
await this._checkoutBranch(repository, branch)
}
}
/** This shouldn't be called directly. See `Dispatcher`. */

View file

@ -481,7 +481,7 @@ export class Dispatcher {
name: string,
startPoint: string | null,
noTrackOption: boolean = false
): Promise<Repository> {
): Promise<void> {
return this.appStore._createBranch(
repository,
name,