Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: utils/pub/git_source.dart

Issue 10905202: Look for git.cmd on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | utils/pub/io.dart » ('j') | utils/pub/io.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/git_source.dart
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
index 5437ece8ef73eda473bb72c84453eb3ea6d26ae7..030e743e6df7a9d3400e6e1df92a5c0316a95fc2 100644
--- a/utils/pub/git_source.dart
+++ b/utils/pub/git_source.dart
@@ -124,8 +124,7 @@ class GitSource extends Source {
return exists(path).chain((exists) {
if (!exists) return _clone(_getUrl(id), path, mirror: true);
- return runProcess("git", ["fetch"], workingDir: path)
- .transform((result) {
+ return runGit(["fetch"], workingDir: path).transform((result) {
if (!result.success) throw 'Git failed.';
return null;
});
@@ -136,7 +135,7 @@ class GitSource extends Source {
* Returns a future that completes to the revision hash of [id].
*/
Future<String> _revisionAt(PackageId id) {
- return runProcess("git", ["rev-parse", _getEffectiveRef(id)],
+ return runGit(["rev-parse", _getEffectiveRef(id)],
workingDir: _repoCachePath(id)).transform((result) {
if (!result.success) throw 'Git failed.';
return result.stdout[0];
@@ -163,7 +162,7 @@ class GitSource extends Source {
Future _clone(String from, String to, [bool mirror=false]) {
var args = ["clone", from, to];
if (mirror) args.insertRange(1, 1, "--mirror");
- return runProcess("git", args).transform((result) {
+ return runGit(args).transform((result) {
if (!result.success) throw 'Git failed.';
return null;
});
@@ -173,8 +172,7 @@ class GitSource extends Source {
* Checks out the reference [ref] in [repoPath].
*/
Future _checkOut(String repoPath, String ref) {
- return runProcess("git", ["checkout", ref], workingDir: repoPath)
- .transform((result) {
+ return runGit(["checkout", ref], workingDir: repoPath).transform((result) {
if (!result.success) throw 'Git failed.';
return null;
});
« no previous file with comments | « no previous file | utils/pub/io.dart » ('j') | utils/pub/io.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698