From e9508e684055202b8a067164dbb241beb69a58a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=95=A6b=E6=A2=A6?= <1715109585@qq.com> Date: Sat, 4 Nov 2023 20:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83,=E7=9C=8B=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- citool/gitLogSum/gitLogSum.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/citool/gitLogSum/gitLogSum.go b/citool/gitLogSum/gitLogSum.go index dacf64c..0e038ca 100644 --- a/citool/gitLogSum/gitLogSum.go +++ b/citool/gitLogSum/gitLogSum.go @@ -9,8 +9,8 @@ import ( ) func main() { - cmdStr := "sh -c 'git log --pretty=format:\"%an|%s|%h|%ad|%H\" --date=format:\"%Y-%m-%d %H:%M\" $(git describe --tags --abbrev=0)^..HEAD'" - cmd := exec.Command("bash", "-c", cmdStr) + cmdStr := "git log --pretty=format:\"%an|%s|%h|%ad|%H\" --date=format:\"%Y-%m-%d %H:%M\" $(git describe --tags --abbrev=0)^..HEAD" + cmd := exec.Command("sh", "-c", cmdStr) // 执行命令并返回结果(输出到控制台) out, err := cmd.CombinedOutput()