源文件上的历史日志和文件 ID 等版本控制信息有用吗?
我知道它们提供了快速参考,但随着代码的增长,它们可能会导致数百个文件因版本/历史记录更新而发生更改。
这导致/涉及我的另一个问题: 有没有办法防止代码注释被标记为从版本控制获得的差异中的更改? (CVS/SVN)
I know that they provide a quick reference, but as the code grows they can lead to hundreds of files changing just due to version/history updates.
This leads/relates to my other question:
Is there a way to prevent code comments to be marked as changes in the diffs obtained from version control? (CVS/SVN)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将版本/历史信息保留在版本控制中。这就是它所擅长的。
源文件中的版本/历史信息仅对那些无法访问版本控制存储库而阅读源代码的人有用。为了证明您的团队需要付出努力来维护这些笔记,这种情况的可能性有多大以及有多重要?我个人的观点是,这会为附带福利增加很多额外的工作。
Keep the version/history info in the version control. That's what it's good at.
Version/history info in the source file is only useful for people that read the source code without having access to your version control repository. How likely and how important is that scenario, to justify the effort you will require from your team to maintain these notes? My personal opinion is that this would add a lot of additional work for fringe benefits.
我同意@Franci Penov 的观点。这里有一个稍微不同的观点:
I agree with @Franci Penov. Here's a slightly different perspective: