mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
refactor(checkout)!: move checkout related methods into Checkout class (#42)
This commit is contained in:
parent
570c696269
commit
9918ab0905
10 changed files with 238 additions and 135 deletions
|
@ -43,7 +43,8 @@ void main() {
|
|||
reference: feature,
|
||||
);
|
||||
|
||||
repo.checkout(target: feature.name);
|
||||
Checkout.reference(repo: repo, name: feature.name);
|
||||
repo.setHead(feature.name);
|
||||
expect(() => repo.index['.gitignore'], throwsA(isA<ArgumentError>()));
|
||||
|
||||
final rebase = Rebase.init(
|
||||
|
@ -141,7 +142,8 @@ void main() {
|
|||
final feature = Reference.lookup(repo: repo, name: 'refs/heads/feature');
|
||||
final upstream = AnnotatedCommit.lookup(repo: repo, oid: repo[shas[1]]);
|
||||
|
||||
repo.checkout(target: feature.name);
|
||||
Checkout.reference(repo: repo, name: feature.name);
|
||||
repo.setHead(feature.name);
|
||||
expect(() => repo.index['conflict_file'], throwsA(isA<ArgumentError>()));
|
||||
|
||||
final rebase = Rebase.init(
|
||||
|
@ -197,7 +199,8 @@ void main() {
|
|||
);
|
||||
final ontoHead = AnnotatedCommit.lookup(repo: repo, oid: conflict.target);
|
||||
|
||||
repo.checkout(target: conflict.name);
|
||||
Checkout.reference(repo: repo, name: conflict.name);
|
||||
repo.setHead(conflict.name);
|
||||
|
||||
final rebase = Rebase.init(
|
||||
repo: repo,
|
||||
|
@ -237,7 +240,8 @@ void main() {
|
|||
);
|
||||
final ontoHead = AnnotatedCommit.lookup(repo: repo, oid: conflict.target);
|
||||
|
||||
repo.checkout(target: conflict.name);
|
||||
Checkout.reference(repo: repo, name: conflict.name);
|
||||
repo.setHead(conflict.name);
|
||||
|
||||
final rebase = Rebase.init(
|
||||
repo: repo,
|
||||
|
@ -266,7 +270,8 @@ void main() {
|
|||
);
|
||||
final ontoHead = AnnotatedCommit.lookup(repo: repo, oid: conflict.target);
|
||||
|
||||
repo.checkout(target: conflict.name);
|
||||
Checkout.reference(repo: repo, name: conflict.name);
|
||||
repo.setHead(conflict.name);
|
||||
|
||||
final rebase = Rebase.init(
|
||||
repo: repo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue