feat(checkout)!: add ability to checkout commit (#35)

This commit is contained in:
Aleksey Kulikov 2022-01-21 17:10:41 +03:00 committed by GitHub
parent 6fe24dcb65
commit f7dde69de3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 115 additions and 38 deletions

View file

@ -43,7 +43,7 @@ void main() {
reference: feature,
);
repo.checkout(refName: feature.name);
repo.checkout(target: feature.name);
expect(() => repo.index['.gitignore'], throwsA(isA<ArgumentError>()));
final rebase = Rebase.init(
@ -141,7 +141,7 @@ void main() {
final feature = repo.lookupReference('refs/heads/feature');
final upstream = AnnotatedCommit.lookup(repo: repo, oid: repo[shas[1]]);
repo.checkout(refName: feature.name);
repo.checkout(target: feature.name);
expect(() => repo.index['conflict_file'], throwsA(isA<ArgumentError>()));
final rebase = Rebase.init(
@ -194,7 +194,7 @@ void main() {
final conflict = repo.lookupReference('refs/heads/conflict-branch');
final ontoHead = AnnotatedCommit.lookup(repo: repo, oid: conflict.target);
repo.checkout(refName: conflict.name);
repo.checkout(target: conflict.name);
final rebase = Rebase.init(
repo: repo,
@ -231,7 +231,7 @@ void main() {
final conflict = repo.lookupReference('refs/heads/conflict-branch');
final ontoHead = AnnotatedCommit.lookup(repo: repo, oid: conflict.target);
repo.checkout(refName: conflict.name);
repo.checkout(target: conflict.name);
final rebase = Rebase.init(
repo: repo,
@ -257,7 +257,7 @@ void main() {
final conflict = repo.lookupReference('refs/heads/conflict-branch');
final ontoHead = AnnotatedCommit.lookup(repo: repo, oid: conflict.target);
repo.checkout(refName: conflict.name);
repo.checkout(target: conflict.name);
final rebase = Rebase.init(
repo: repo,