javydreamercsw
javydreamercsw

Reputation: 5119

Is it useful to have versioning information like history log and file ID on the source file?

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)

Upvotes: 2

Views: 99

Answers (2)

Jörg W Mittag
Jörg W Mittag

Reputation: 369536

I agree with @Franci Penov. Here's a slightly different perspective:

  • In the best case, they are useless, because they just duplicate information that is readily available, always automatically up-to-date, and much easier accessible in the version control system.
  • In all other cases, they range from distracting over annoying to outright misleading (if they go out of sync with the version control system).

Upvotes: 3

Franci Penov
Franci Penov

Reputation: 76001

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.

Upvotes: 8

Related Questions