git-command-helper
Version:
github command helper for nodejs
23 lines (19 loc) • 523 B
JavaScript
// git-command-helper 2.1.0 by Dimas Lanjaka <dimaslanjaka@gmail.com> (https://www.webmanajemen.com)
;
var gitConfig = require('./gitConfig.js');
/**
* force end of line LF
* @param cwd
*/
async function forceEolLF(cwd) {
const config = new gitConfig.gitConfig({
cwd
});
// set the EOL
await config.eol("lf");
// compatibility for windows
await config.autocrlf(true);
// update index
await config.git.spawn("git", ["checkout-index", "-r", "--all"]);
}
exports.forceEolLF = forceEolLF;