1-- SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
2--
3-- SPDX-License-Identifier: GPL-3.0-or-later
4
5local M = {}
6
7--- Execute a git command with config to suppress noise while preserving errors
8---@param cmd string git subcommand and arguments (without "git" prefix)
9---@return boolean success
10function M.git(cmd)
11 local prefix = "git -c init.defaultBranch=main -c user.email=test@test.com "
12 .. "-c user.name=Test -c advice.detachedHead=false "
13 return os.execute(prefix .. cmd)
14end
15
16return M