IntelliJ注释vs git责备 [英] IntelliJ annotate vs git blame

查看:119
本文介绍了IntelliJ注释vs git责备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IntelliJ的注释功能在编辑器中查看最近一次修改文件中某一行的行。

现在我正在使用JGit来读取相同的注释,它们有所不同。对我来说,似乎Intellij检查一行在提交之间没有改变,仍然使用旧的提交信息。 JGit没有看到它,所以发出其他消息。

有人可以证实JGit blame和IntelliJ的行为有所不同吗?是什么原因以及如何强制IntelliJ像JGit一样行事?也许IntelliJ忽略空白变化?



我使用IntelliJ 15.0.1和JGit 4.1.1

解决方案

IntelliJ IDEA没有自己的算法来计算注释;它只是运行标准 git blame 命令并解析其输出。无法强制它的行为不同。



您可以在IntelliJ IDEA Git插件中找到实现注释命令的代码 here


I am using IntelliJ's annotate feature to see in the editor who last changed a line in a file.

Now I am using JGit to read the same annotations and they differ. For me it seems that Intellij checks that a line has not been changed between commits and still uses the old commit message. JGit does not see it and so makes an other message.

Can anybody confirm that the behavior of JGit blame and IntelliJ differs? Whats the reason and how can I force IntelliJ to behave the same like JGit? Maybe IntelliJ ignores whitespace changes?

I am using IntelliJ 15.0.1 and JGit 4.1.1

解决方案

IntelliJ IDEA does not have its own algorithm for calculating annotations; it simply runs the standard git blame command and parses its output. There is no way to force it to behave differently.

You can find the code implementing the Annotate command in the IntelliJ IDEA Git plugin here.

这篇关于IntelliJ注释vs git责备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆