【发布时间】:2019-06-13 11:34:29
【问题描述】:
Git 日志给出 400,500 作为提交者名称
我有一个 powershell 脚本,它在 2 个分支之间运行 git diff 并在文件中给我输出。
git diff generates the diff file using git diff --summary --name-status --diff-filter=ADMRCT $branch1..$branch2 | Out-File $temp
$temp 文件被迭代并读取每一行以从 git log 获取最后提交者名称和最后提交日期,因为此信息不是由 git diff
提供的
foreach ($obj in $temp) {
$file =$obj.FileName
$gitoutput = git log -1 --format=%cd-%cn "$file" }
附加输出。SampleForReference `
【问题讨论】:
-
你能给出发生这种情况的文件的两个
git log输出吗?一个包含git log的前几行,另一个包含您的命令输出。 -
另外,你能修正一下你帖子的格式吗?
-
嗨 Nils,我已经格式化了我的问题,你能帮我吗?