Git显示错误消息和错误的输出较少。我该如何修复?

huangapple go评论66阅读模式
英文:

Git less shows an error message and bad output. How can I fix it?

问题

After installing delta and some configuration around it, Git less (the default pager) seems to have gotten screwed up. For example, if I do a git log, the results look like this:

>git log
-" must be followed by 1 or 2 chars
Press RETURN to continue

The logs that follow have strange formatting with a bunch of "ESC" and other oddities:

ESC[33mcommit fcb45[...]

I've found the actual error message in less here:

https://github.com/gdamore/less-fork/blob/master/optfunc.c#L489

But how do I fix this?

I've tried:

  1. Reinstalling Git.
  2. Uninstalling Git, deleting C:\Program Files\Git, and then reinstalling.
  3. Deleting the Delta pager and removing it from PATH.

It would make sense to me to reinstall Less, but how do I do that?

英文:

After installing delta and some configuration around it, Git less (the default pager) seems to have gotten screwed up. For example, if I do a git log, the results look like this:

>git log
-" must be followed by 1 or 2 chars
Press RETURN to continue

The logs that follow have strange formatting with a bunch of "ESC" and other oddities:

ESC[33mcommit fcb45[...]

I've found the actual error message in less here:

https://github.com/gdamore/less-fork/blob/master/optfunc.c#L489

But how do I fix this?

I've tried:

  1. Reinstalling Git.
  2. Uninstalling Git, deleting C:\Program Files\Git, and then reinstalling.
  3. Deleting the Delta pager and removing it from PATH.

It would make sense to me to reinstall Less, but how do I do that?

答案1

得分: 2

我发现在更多搜索后,我尝试使用 git add -p 时创建了这个环境变量:

Git显示错误消息和错误的输出较少。我该如何修复?

当我删除了它并重新启动了我的Windows命令提示符时,问题消失了。

英文:

After more searching around, I discovered that while trying to get Delta to work with git add -p, I created this environment variable:

Git显示错误消息和错误的输出较少。我该如何修复?

When I deleted this and restarted my Windows command prompt, the problem went away.

huangapple
  • 本文由 发表于 2023年5月10日 14:37:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76215518.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定