mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-18 01:13:06 +08:00
Change Git dart API
Use a class instead of a many functions. This way we avoid passing the same arguments again and again.
This commit is contained in:
@ -34,13 +34,14 @@ Future migrateGitRepo({
|
||||
print("Migrating " + file.path + " --> " + toPath);
|
||||
|
||||
await file.copy(toPath);
|
||||
await gitAdd(toGitBaseFolder, fileName);
|
||||
await gitCommit(
|
||||
gitFolder: toGitBaseFolder,
|
||||
|
||||
var gitRepo = GitRepo(
|
||||
folderName: toGitBaseFolder,
|
||||
authorEmail: Settings.instance.gitAuthorEmail,
|
||||
authorName: Settings.instance.gitAuthor,
|
||||
message: "Added Journal Entry",
|
||||
);
|
||||
await gitRepo.add(fileName);
|
||||
await gitRepo.commit(message: "Added Journal Entry");
|
||||
}
|
||||
print("migrateGitRepo: Done");
|
||||
}
|
||||
|
Reference in New Issue
Block a user