-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop RemoteBranch in favor of RemoteBranchData
- redundant data structure and api removed - served same purpose as `find_git_branches`
- Loading branch information
Showing
12 changed files
with
66 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
import { invoke } from '$lib/backend/ipc'; | ||
import { Branch, BranchData } from '$lib/vbranches/types'; | ||
import { BranchData } from '$lib/vbranches/types'; | ||
import { plainToInstance } from 'class-transformer'; | ||
|
||
export class GitBranchService { | ||
constructor(private projectId: string) {} | ||
|
||
async findBranches(name: string) { | ||
return plainToInstance( | ||
Branch, | ||
await invoke<any[]>('find_git_branches', { projectId: this.projectId, branchName: name }) | ||
); | ||
} | ||
|
||
async getRemoteBranchData(refname: string): Promise<BranchData> { | ||
return plainToInstance( | ||
BranchData, | ||
await invoke<any>('get_remote_branch_data', { projectId: this.projectId, refname }) | ||
await invoke<any[]>('find_git_branches', { projectId: this.projectId, branchName: name }) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.