DefinitelyTyped/types/gitconfiglocal/gitconfiglocal-tests.ts
2018-11-18 17:16:07 -08:00

22 lines
389 B
TypeScript

import gitconfig = require('gitconfiglocal');
gitconfig('dir', (error, config) => {
if (error) {
// oh no
return;
}
const url = config.remote;
const filemode = config.core.filemode;
});
gitconfig('dir', {gitDir: './'}, (error, config) => {
if (error) {
// oh no
return;
}
const url = config.remote.origin.url;
const filemode = config.core.filemode;
});