Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/lib/src/source/git.dart

Issue 145633008: Ensure that a locked git dependency is downloaded correctly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: forgot the test Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: sdk/lib/_internal/pub/lib/src/source/git.dart
diff --git a/sdk/lib/_internal/pub/lib/src/source/git.dart b/sdk/lib/_internal/pub/lib/src/source/git.dart
index c50e7196c97b3b0caf3407e886d7afe79e6bcd44..2981ebe42f6f8a27073a5f7c9fc61a853bb8e370 100644
--- a/sdk/lib/_internal/pub/lib/src/source/git.dart
+++ b/sdk/lib/_internal/pub/lib/src/source/git.dart
@@ -130,8 +130,9 @@ class GitSource extends Source {
/// Returns a future that completes to the revision hash of [id].
Future<String> _revisionAt(PackageId id) {
- return git.run(["rev-parse", _getEffectiveRef(id)],
- workingDir: _repoCachePath(id)).then((result) => result[0]);
+ return _ensureRepoCache(id).then((_) =>
+ git.run(["rev-parse", _getEffectiveRef(id)],
+ workingDir: _repoCachePath(id)).then((result) => result[0]));
}
/// Clones the repo at the URI [from] to the path [to] on the local
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/log.dart ('k') | sdk/lib/_internal/pub/test/get/git/locked_revision_without_repo_test.dart » ('j') | no next file with comments »

Powered by Google App Engine