diff --git a/examples/add-and-commit.js b/examples/add-and-commit.js index 184ae5a15..4f4959dd7 100644 --- a/examples/add-and-commit.js +++ b/examples/add-and-commit.js @@ -57,10 +57,10 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) return repo.getCommit(head); }) .then(function(parent) { - var author = nodegit.Signature.create("Scott Chacon", - "schacon@gmail.com", 123456789, 60); - var committer = nodegit.Signature.create("Scott A Chacon", - "scott@github.com", 987654321, 90); + var author = nodegit.Signature.now("Scott Chacon", + "schacon@gmail.com"); + var committer = nodegit.Signature.now("Scott A Chacon", + "scott@github.com"); return repo.createCommit("HEAD", author, committer, "message", oid, [parent]); }) diff --git a/examples/create-new-repo.js b/examples/create-new-repo.js index 725942b09..1c7e3e9f5 100644 --- a/examples/create-new-repo.js +++ b/examples/create-new-repo.js @@ -32,10 +32,10 @@ fse.ensureDir(path.resolve(__dirname, repoDir)) return index.writeTree(); }) .then(function(oid) { - var author = nodegit.Signature.create("Scott Chacon", - "schacon@gmail.com", 123456789, 60); - var committer = nodegit.Signature.create("Scott A Chacon", - "scott@github.com", 987654321, 90); + var author = nodegit.Signature.now("Scott Chacon", + "schacon@gmail.com"); + var committer = nodegit.Signature.now("Scott A Chacon", + "scott@github.com"); // Since we're creating an inital commit, it has no parents. Note that unlike // normal we don't get the head either, because there isn't one yet. diff --git a/examples/general.js b/examples/general.js index ce432cb50..b6ae7efc9 100644 --- a/examples/general.js +++ b/examples/general.js @@ -138,10 +138,10 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) // nodegit provides a couple of methods to create commit objects easily as // well. - var author = nodegit.Signature.create("Scott Chacon", - "schacon@gmail.com", 123456789, 60); - var committer = nodegit.Signature.create("Scott A Chacon", - "scott@github.com", 987654321, 90); + var author = nodegit.Signature.now("Scott Chacon", + "schacon@gmail.com"); + var committer = nodegit.Signature.now("Scott A Chacon", + "scott@github.com"); // Commit objects need a tree to point to and optionally one or more // parents. Here we're creating oid objects to create the commit with, diff --git a/examples/merge-cleanly.js b/examples/merge-cleanly.js index 5cc409c42..e277477bf 100644 --- a/examples/merge-cleanly.js +++ b/examples/merge-cleanly.js @@ -18,10 +18,10 @@ var theirCommit; var ourBranch; var theirBranch; -var ourSignature = nodegit.Signature.create("Ron Paul", - "RonPaul@TollRoadsRBest.info", 123456789, 60); -var theirSignature = nodegit.Signature.create("Greg Abbott", - "Gregggg@IllTollYourFace.us", 123456789, 60); +var ourSignature = nodegit.Signature.now("Ron Paul", + "RonPaul@TollRoadsRBest.info"); +var theirSignature = nodegit.Signature.now("Greg Abbott", + "Gregggg@IllTollYourFace.us"); // Create a new repository in a clean directory, and add our first file fse.remove(path.resolve(__dirname, repoDir)) diff --git a/examples/merge-with-conflicts.js b/examples/merge-with-conflicts.js index 1201bac38..77e78340e 100644 --- a/examples/merge-with-conflicts.js +++ b/examples/merge-with-conflicts.js @@ -10,12 +10,12 @@ var ourFileContent = "Big Bobs are best, IMHO.\n"; var theirFileContent = "Nobody expects the small Bobquisition!\n"; var finalFileContent = "Big Bobs are beautiful and the small are unexpected!\n"; -var baseSignature = nodegit.Signature.create("Peaceful Bob", - "justchill@bob.net", 123456789, 60); -var ourSignature = nodegit.Signature.create("Big Bob", - "impressive@bob.net", 123456789, 60); -var theirSignature = nodegit.Signature.create("Small Bob", - "underestimated@bob.net", 123456789, 60); +var baseSignature = nodegit.Signature.now("Peaceful Bob", + "justchill@bob.net"); +var ourSignature = nodegit.Signature.now("Big Bob", + "impressive@bob.net"); +var theirSignature = nodegit.Signature.now("Small Bob", + "underestimated@bob.net"); var ourBranchName = "ours"; var theirBranchName = "theirs"; diff --git a/examples/push.js b/examples/push.js index 990a6ae42..5c19b7034 100644 --- a/examples/push.js +++ b/examples/push.js @@ -10,8 +10,8 @@ var repoDir = "../../newRepo"; var repository; var remote; -var signature = nodegit.Signature.create("Foo bar", - "foo@bar.com", 123456789, 60); +var signature = nodegit.Signature.now("Foo bar", + "foo@bar.com"); // Create a new repository in a clean directory, and add our first file fse.remove(path.resolve(__dirname, repoDir)) diff --git a/examples/remove-and-commit.js b/examples/remove-and-commit.js index 10751f061..4ba8c777a 100644 --- a/examples/remove-and-commit.js +++ b/examples/remove-and-commit.js @@ -40,10 +40,10 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) return _repository.getCommit(head); }) .then(function(parent) { - var author = nodegit.Signature.create("Scott Chacon", - "schacon@gmail.com", 123456789, 60); - var committer = nodegit.Signature.create("Scott A Chacon", - "scott@github.com", 987654321, 90); + var author = nodegit.Signature.now("Scott Chacon", + "schacon@gmail.com"); + var committer = nodegit.Signature.now("Scott A Chacon", + "scott@github.com"); return _repository.createCommit("HEAD", author, committer, "message", _oid, [parent]);