aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDanielle Adams <[email protected]>2018-07-02 21:02:58 -0400
committerMarak <[email protected]>2018-09-23 11:12:09 -0400
commit49f0cea3b9b609ca643fa0e4e98f09076ad004c2 (patch)
treee1736c3da4048e2609ba9d1fc5ce9d432fad2d46 /lib
parent200ab1321231e63be401917433cd651ba2df7c51 (diff)
downloadfaker-49f0cea3b9b609ca643fa0e4e98f09076ad004c2.tar.xz
faker-49f0cea3b9b609ca643fa0e4e98f09076ad004c2.zip
change shas to use hex chars
Diffstat (limited to 'lib')
-rw-r--r--lib/git.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/git.js b/lib/git.js
index 1cf9121d..d431ea2d 100644
--- a/lib/git.js
+++ b/lib/git.js
@@ -6,6 +6,8 @@ var Git = function(faker) {
var self = this;
var f = faker.fake;
+ var hexChars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
+
/**
* branch
*
@@ -58,7 +60,7 @@ var Git = function(faker) {
var commit = "";
for (var i = 0; i < 40; i++) {
- commit += faker.random.alphaNumeric();
+ commit += faker.random.arrayElement(hexChars);
}
return commit;
@@ -73,7 +75,7 @@ var Git = function(faker) {
var shortSha = "";
for (var i = 0; i < 7; i++) {
- shortSha += faker.random.alphaNumeric();
+ shortSha += faker.random.arrayElement(hexChars);
}
return shortSha;