chore: remove unused getBranch util

This commit is contained in:
2019-04-04 16:21:17 -07:00
parent b84c4556cd
commit 2d6e1ed822

View File

@@ -36,16 +36,6 @@ exports.getIdent = () => {
return name;
};
exports.getBranch = () => {
const headPath = path.join(exports.getRootPath(), '.git/HEAD');
if (!exports.canAccessFile(headPath)) throw new Error(`Git HEAD not found: ${headPath}`);
const head = fs.readFileSync(headPath);
const match = /ref: refs\/heads\/([^\n]+)/.exec(head);
if (!match) throw new Error(`Unable to read branch from ${headPath}`);
return match[1];
};
exports.getConfig = (overrides = {}) => {
const joycon = new JoyCon();
const defaults = {