Skip to content

Commit 33cecb4

Browse files
authored
Merge pull request #266 from lufterc/null-term-patch
Null-line terminator to support non-latin chars
2 parents b428ae6 + 5afdaa3 commit 33cecb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/gitmech.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,11 @@ var gitMech = {
393393
},
394394

395395
ls: function (pattern, callback) {
396-
gitExec([ 'ls-tree', '--name-only', '-r', 'HEAD', '--', docSubdir + pattern ], function (err, data) {
396+
gitExec([ 'ls-tree', '--name-only', '-z', '-r', 'HEAD', '--', docSubdir + pattern ], function (err, data) {
397397
if (err) {
398398
data = ''
399399
}
400-
callback(null, data.toString().split('\n').filter(function (v) {
400+
callback(null, data.toString().split('\0').filter(function (v) {
401401
return v !== ''
402402
}))
403403
})

0 commit comments

Comments
 (0)