Live data from Hacker News

Unix version control lore: what, ident

dotat.at

21–29 of 29 posts

Re: Unix version control lore: what, ident

#21
A lot of these techniques are fragile, and complicate lots of other things.

It is very useful if the same code compiles to the same binary if no changes occurred.

But having the date and time or a version control comment change a binary may lead to unnecessary churn with dependencies, packages, and integrity checks.

Re: Unix version control lore: what, ident

#22
I work on a code base dating back to 2000. First years, the change log was kept at the top of the file, in a comment. Commit comments were automatically inserted into the file by a "$Log" directive (CVS). The first 200 lines are just 20 year old commit log entries, none of them providing any valuable information ("minor changes", "changed XYZ to be consistent with spec", "reenable reporting"). So much cargo culting.

Re: Unix version control lore: what, ident

#23

I work on a code base dating back to 2000. First years, the change log was kept at the top of the file, in a comment. Commit comments were automatically inserted into the file by a "$Log" directive (CVS). The first 200 lines are just 20 year old commit log entries, none of them providing any valuable information ("minor changes", "changed XYZ to be consistent with spec", "reenable reporting"). So much cargo culting.

This reminds me of my fond memories of migrating from perforce to git and getting to delete similar perforce style comments at the top of every file. So satisfying to clean that up.

Re: Unix version control lore: what, ident

#24

I work on a code base dating back to 2000. First years, the change log was kept at the top of the file, in a comment. Commit comments were automatically inserted into the file by a "$Log" directive (CVS). The first 200 lines are just 20 year old commit log entries, none of them providing any valuable information ("minor changes", "changed XYZ to be consistent with spec", "reenable reporting"). So much cargo culting.

I worked on a telecom codebase that dated back to 1985. Similar experiences. Was wild to think of contributing to something that was almost as old as me.

Re: Unix version control lore: what, ident

#25

I work on a code base dating back to 2000. First years, the change log was kept at the top of the file, in a comment. Commit comments were automatically inserted into the file by a "$Log" directive (CVS). The first 200 lines are just 20 year old commit log entries, none of them providing any valuable information ("minor changes", "changed XYZ to be consistent with spec", "reenable reporting"). So much cargo culting.

Everyone I knew who was using CVS in the 1990s said that $Log$ was a bad idea that should never be used. Why haven’t you deleted the useless comments?

Re: Unix version control lore: what, ident

#26
post #21

A lot of these techniques are fragile, and complicate lots of other things. It is very useful if the same code compiles to the same binary if no changes occurred. But having the date and time or a version control comment change a binary may lead to unnecessary churn with dependencies, packages, and integrity checks.

This has no effect on reproducible builds since the version strings are stable.

Re: Unix version control lore: what, ident

#27
post #15

FreeBSD finally removed the last of the $Id$ in the source some months ago. I don't entirely know why they were so keen to do this but I'm sure they had a reason. I don't see this, or binary .ident strings as e.g. clashing with idempotent builds.

Does anyone have information about these lines? Are they auto-generated?

Re: Unix version control lore: what, ident

#28
post #15

FreeBSD finally removed the last of the $Id$ in the source some months ago. I don't entirely know why they were so keen to do this but I'm sure they had a reason. I don't see this, or binary .ident strings as e.g. clashing with idempotent builds.

I gather it was because $FreeBSD$ stopped working with the move to git, so they removed it and its predecessors. (TBH the historical idents were not practically useful.) IMO it would be nice to at least retain a git hash in the kernel that can be found by what and ident.

Re: Unix version control lore: what, ident

#29
post #15

FreeBSD finally removed the last of the $Id$ in the source some months ago. I don't entirely know why they were so keen to do this but I'm sure they had a reason. I don't see this, or binary .ident strings as e.g. clashing with idempotent builds.

Does anyone have information about these lines? Are they auto-generated?

Both Subversion[1] and CVS[2] had keyword substitution, which replaced those tags with useful information like the commit id, author, date, etc.

They were very useful when you were looking at a source file, to see what version of that file you had.

Git had something similar with Git Attributes[3], but AFAIK, they were just references to blob ids, so they never really took off.

For git, I now use tags (and versioning based on tags), that more or less replaced svn/cvs keyword substitution in the git ecosystem.

[1] - https://svnbook.red-bean.com/en/1.7/svn.advanced.props.speci...

[2] - https://www.gnu.org/software/trans-coord/manual/cvs/html_nod...

[3] - https://git-scm.com/book/en/v2/Customizing-Git-Git-Attribute...

Post reply on HN