From 2d6e1ed822abf865f11b35c054ebdfda55b3ce28 Mon Sep 17 00:00:00 2001 From: joe fleming Date: Thu, 4 Apr 2019 16:21:17 -0700 Subject: [PATCH] chore: remove unused getBranch util --- src/utils.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/utils.js b/src/utils.js index e20afef..2b1fd07 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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 = {