fix: refactor

This commit is contained in:
Barrett Ruth 2025-09-21 11:19:00 -04:00
parent a33e66680b
commit 58f9be5f9a
5 changed files with 62 additions and 46 deletions

View file

@ -1,8 +1,9 @@
local M = {}
local utils = require('cp.utils')
local function get_git_version()
local plugin_path = debug.getinfo(1, 'S').source:sub(2)
local plugin_root = vim.fn.fnamemodify(plugin_path, ':h:h:h')
local plugin_root = utils.get_plugin_path()
local result = vim
.system({ 'git', 'describe', '--tags', '--always', '--dirty' }, {