mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 19:36:25 +08:00
Use dart-git's convenience method
This commit is contained in:
@ -502,12 +502,7 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
|||||||
String error;
|
String error;
|
||||||
try {
|
try {
|
||||||
var repo = await GitRepository.load(repoPath);
|
var repo = await GitRepository.load(repoPath);
|
||||||
var remotes = repo.config.remotes;
|
await repo.addOrUpdateRemote(widget.remoteName, _gitCloneUrl);
|
||||||
var i = remotes.indexWhere((r) => r.name == widget.remoteName);
|
|
||||||
if (i != -1) {
|
|
||||||
await repo.removeRemote(widget.remoteName);
|
|
||||||
}
|
|
||||||
await repo.addRemote(widget.remoteName, _gitCloneUrl);
|
|
||||||
|
|
||||||
var repoN = git_bindings.GitRepo(folderPath: repoPath);
|
var repoN = git_bindings.GitRepo(folderPath: repoPath);
|
||||||
await repoN.fetch(
|
await repoN.fetch(
|
||||||
|
@ -181,7 +181,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: b489bbb315e066b332e438747c1359004ff2b244
|
resolved-ref: "52c0358eadd2e320c845a6e5af39a84b89220a58"
|
||||||
url: "https://github.com/GitJournal/dart-git.git"
|
url: "https://github.com/GitJournal/dart-git.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.2"
|
version: "0.0.2"
|
||||||
|
Reference in New Issue
Block a user