Skip to content

Commit f032a2f

Browse files
author
John Haley
committed
Added Config.getString for backwards compatibility
1 parent 0f4c01b commit f032a2f

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

lib/config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var NodeGit = require("../");
2+
3+
var Config = NodeGit.Config;
4+
5+
// Backwards compatibility.
6+
Config.getString = function() {
7+
return Config.getStringBuf.apply(this, arguments);
8+
};

test/tests/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe("Config", function() {
3131
return NodeGit.Config.openDefault();
3232
})
3333
.then(function(config) {
34-
return config.getStringBuf("user.name");
34+
return config.getString("user.name");
3535
})
3636
.then(function(userNameFromNodeGit) {
3737
assert.equal(savedUserName + "-test", userNameFromNodeGit);
@@ -65,7 +65,7 @@ describe("Config", function() {
6565
return repo.config();
6666
})
6767
.then(function(config) {
68-
return config.getStringBuf("user.name");
68+
return config.getString("user.name");
6969
})
7070
.then(function(userNameFromNodeGit) {
7171
assert.equal(savedUserName + "-test", userNameFromNodeGit);

0 commit comments

Comments
 (0)