Skip to content

Commit ff081d1

Browse files
author
John Haley
committed
Renamed Git to NodeGit in guides to be more explicit
1 parent f31ddcb commit ff081d1

File tree

6 files changed

+25
-26
lines changed

6 files changed

+25
-26
lines changed

guides/cloning/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ In the guides directory, we like to keep our NodeGit relative to the project
2626
root.
2727

2828
``` javascript
29-
var Git = require("../../../");
29+
var NodeGit = require("../../../");
3030
```
3131

3232
However, in your project you will most likely be using the following command:
3333

3434
``` javascript
35-
var Git = require("nodegit");
35+
var NodeGit = require("nodegit");
3636
```
3737

3838
### Clone URL
@@ -94,7 +94,7 @@ You can easily invoke our top-level Clone as a function passing along the three
9494
aforementioned arguments.
9595

9696
``` javascript
97-
var cloneRepository = Git.Clone(cloneURL, localPath, cloneOptions);
97+
var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions);
9898
```
9999

100100
Notice how we store the return value from `Git.Clone`. This is a
@@ -110,7 +110,7 @@ a function to attempt opening in this case.
110110

111111
``` javascript
112112
var errorAndAttemptOpen = function() {
113-
return Git.Repository.open(local);
113+
return NodeGit.Repository.open(local);
114114
};
115115
```
116116

guides/cloning/gh-two-factor/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ In the guides directory, we like to keep our NodeGit relative to the project
2626
root.
2727

2828
``` javascript
29-
var Git = require("../../../");
29+
var NodeGit = require("../../../");
3030
```
3131

3232
However, in your project you will most likely be using the following command:
3333

3434
``` javascript
35-
var Git = require("nodegit");
35+
var NodeGit = require("nodegit");
3636
```
3737

3838
### GitHub Personal OAuth Token
@@ -118,7 +118,7 @@ The `remoteCallbacks` object now looks like this:
118118
cloneOptions.remoteCallbacks = {
119119
certificateCheck: function() { return 1; },
120120
credentials: function() {
121-
return Git.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic");
121+
return NodeGit.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic");
122122
}
123123
};
124124
```
@@ -129,7 +129,7 @@ You can easily invoke our top-level Clone as a function passing along the three
129129
aforementioned arguments.
130130

131131
``` javascript
132-
var cloneRepository = Git.Clone(cloneURL, localPath, cloneOptions);
132+
var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions);
133133
```
134134

135135
Notice how we store the return value from `Git.Clone`. This is a
@@ -145,7 +145,7 @@ a function to attempt opening in this case.
145145

146146
``` javascript
147147
var errorAndAttemptOpen = function() {
148-
return Git.Repository.open(local);
148+
return NodeGit.Repository.open(local);
149149
};
150150
```
151151

@@ -163,4 +163,3 @@ cloneRepository.catch(errorAndAttemptOpen)
163163
console.log("Is the repository bare? %s", Boolean(repository.isBare()));
164164
});
165165
```
166-

guides/cloning/gh-two-factor/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// relative path. In your project, you will use:
33
//
44
// var NodeGit = require("nodegit");
5-
var Git = require("../../../");
5+
var NodeGit = require("../../../");
66

77
// To clone with two factor auth enabled, you have to use a GitHub OAuth token
88
// over HTTPS.
@@ -23,17 +23,17 @@ var cloneOptions = {};
2323
cloneOptions.remoteCallbacks = {
2424
certificateCheck: function() { return 1; },
2525
credentials: function() {
26-
return Git.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic");
26+
return NodeGit.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic");
2727
}
2828
};
2929

3030
// Invoke the clone operation and store the returned Promise.
31-
var cloneRepository = Git.Clone(cloneURL, localPath, cloneOptions);
31+
var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions);
3232

3333
// If the repository already exists, the clone above will fail. You can simply
3434
// open the repository in this case to continue execution.
3535
var errorAndAttemptOpen = function() {
36-
return Git.Repository.open(localPath);
36+
return NodeGit.Repository.open(localPath);
3737
};
3838

3939
// Once the repository has been cloned or opened, you can work with a returned

guides/cloning/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// relative path. In your project, you will use:
33
//
44
// var NodeGit = require("nodegit");
5-
var Git = require("../../../");
5+
var NodeGit = require("../../../");
66

77
// Using the `clone` method from the `Git.Clone` module, bring down the NodeGit
88
// test repository from GitHub.
@@ -21,12 +21,12 @@ cloneOptions.remoteCallbacks = {
2121
};
2222

2323
// Invoke the clone operation and store the returned Promise.
24-
var cloneRepository = Git.Clone(cloneURL, localPath, cloneOptions);
24+
var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions);
2525

2626
// If the repository already exists, the clone above will fail. You can simply
2727
// open the repository in this case to continue execution.
2828
var errorAndAttemptOpen = function() {
29-
return Git.Repository.open(localPath);
29+
return NodeGit.Repository.open(localPath);
3030
};
3131

3232
// Once the repository has been cloned or opened, you can work with a returned

guides/cloning/ssh-with-agent/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ In the guides directory, we like to keep our NodeGit relative to the project
2626
root.
2727

2828
``` javascript
29-
var Git = require("../../../");
29+
var NodeGit = require("../../../");
3030
```
3131

3232
However, in your project you will most likely be using the following command:
3333

3434
``` javascript
35-
var Git = require("nodegit");
35+
var NodeGit = require("nodegit");
3636
```
3737

3838
### Clone URL
@@ -101,7 +101,7 @@ The `remoteCallbacks` object now looks like this:
101101
cloneOptions.remoteCallbacks = {
102102
certificateCheck: function() { return 1; },
103103
credentials: function(url, userName) {
104-
return Git.Cred.sshKeyFromAgent(userName);
104+
return NodeGit.Cred.sshKeyFromAgent(userName);
105105
}
106106
};
107107
```
@@ -117,7 +117,7 @@ You can easily invoke our top-level Clone as a function passing along the three
117117
aforementioned arguments.
118118

119119
``` javascript
120-
var cloneRepository = Git.Clone(cloneURL, localPath, cloneOptions);
120+
var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions);
121121
```
122122

123123
Notice how we store the return value from `Git.Clone`. This is a
@@ -133,7 +133,7 @@ a function to attempt opening in this case.
133133

134134
``` javascript
135135
var errorAndAttemptOpen = function() {
136-
return Git.Repository.open(local);
136+
return NodeGit.Repository.open(local);
137137
};
138138
```
139139

guides/cloning/ssh-with-agent/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// relative path. In your project, you will use:
33
//
44
// var NodeGit = require("nodegit");
5-
var Git = require("../../../");
5+
var NodeGit = require("../../../");
66

77
// Set the URL that NodeGit will connect to clone.
88
var cloneURL = "git@github.com:nodegit/test";
@@ -22,17 +22,17 @@ cloneOptions.remoteCallbacks = {
2222
// `userName` argument to the `sshKeyFromAgent` function to validate
2323
// authentication.
2424
credentials: function(url, userName) {
25-
return Git.Cred.sshKeyFromAgent(userName);
25+
return NodeGit.Cred.sshKeyFromAgent(userName);
2626
}
2727
};
2828

2929
// Invoke the clone operation and store the returned Promise.
30-
var cloneRepository = Git.Clone(cloneURL, localPath, cloneOptions);
30+
var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions);
3131

3232
// If the repository already exists, the clone above will fail. You can simply
3333
// open the repository in this case to continue execution.
3434
var errorAndAttemptOpen = function() {
35-
return Git.Repository.open(localPath);
35+
return NodeGit.Repository.open(localPath);
3636
};
3737

3838
// Once the repository has been cloned or opened, you can work with a returned

0 commit comments

Comments
 (0)