Live data from Hacker News

Ask HN: Do you ever truly use your revision history?

news.ycombinator.com

131–140 of 287 posts

Re: Ask HN: Do you ever truly use your revision history?

#131
post #95

Yes, yes, absolutely. I've looked at history going back 10+ years (at least). Many times. Two-year-old commits I consider to be fairly recent. I can't remember a specific reason why off the top of my head, but it was usually something to do with looking at the context around why some piece of code existed. The companies I've worked for also require commit messages to contain bug tracking IDs, which can provide furthe…

> There's also really not much of a reason to migrate from svn to git if svn is still working for your organization.

But also not much reason against, given the quality of migration tools. The toughest nut to crack is the absence of that handy incrementing version counter.

Re: Ask HN: Do you ever truly use your revision history?

#132
Constantly. Devlopment is a process, and artifacts fall out of it. The obvious artifact is the source code, but others include documentation, revision history, tickets and infrastructure configuration. We should be taking as much care of these as we do source code.

One example I don't think I've seen mentioned in this thread is that sometimes a change touches two widely-separated parts of the code. The commit message may be your only opportunity to comment both parts at the same time - to tie them together.

Re: Ask HN: Do you ever truly use your revision history?

#134
> they haven't transitioned from SVN to git solely because of the logistical challenge of migrating 30 years of commits

The decision of migrating the repository or missing the commits is a false dichotomy. One can deal with two repositories without much of a problem, it's only a little slow down at the rare event you have to look at it.

Anyway, that applies only if you do have a reason to migrate.

Re: Ask HN: Do you ever truly use your revision history?

#135
post #96

All the time! Two weeks ago I found something in a critical library at work (that ~every single C++ binary we run depends on: our main implementation of our custom threads' executor API) that made no sense. I couldn't understand why a variable was being rounded before being passed down to a lower layer, in a way that introduced an average 0.5 Ms of latency to many operations (I estimate that at peak, just one of the…

Chestertons Fence, to put a name to the phenomenon.

https://en.wikipedia.org/wiki/Wikipedia:Chesterton%27s_fence

Re: Ask HN: Do you ever truly use your revision history?

#136
Yes, all the time. I frequently need to know who made a change, what ticket was associated with that change, when was it made, what did the code do prior to that change, etc. We did make the change to git almost 10 years ago. I wasn't directly involved, but we managed to do it in a way that largely preserved history.

Re: Ask HN: Do you ever truly use your revision history?

#138
Almost everyday, often several times per day.

Changes made more than 10 years ago help to fix bugs still present today even if the codebase has changed a lot (they have commit messages, link to old tickets with more discussions ; sometimes, just the name of the committer tells a lot about what to expect from a change).

I've spent a lot of efforts when we started migrating from SVN to git to not lose this, knowing the pain of not having the history go far enough (some of our projects were already migrated from CVS to SVN a long time ago, and histories where lost then). Efforts have been more human than technical, BTW, since not everyone was aware of the value of the history — usually bugs in the oldest parts of the codebase get through only a handful of people who have been there for a long time, and other people tend to take for granted that we understand why something is the way it is.

Re: Ask HN: Do you ever truly use your revision history?

#139
post #18

We switched from SVN to Git about a year and a half ago. I often use the "annotate" feature in my editor to see the history of lines of code (to figure out who to talk to when I have questions), and I routinely run into the "initial commit" wall from when everything was squashed. I wish that when the team had migrated from SVN to git, they had used a tool that would have preserved the history. It's very easy to do! I…

It may not be too late. you could rewrite the history (but good luck syncing it to everyone)

You don't even need to rewrite the history. Create a separate repository with the converted SVN history, and tell everyone who needs it how to virtually combine both repositories through the .git/info/grafts mechanism.

Re: Ask HN: Do you ever truly use your revision history?

#140
Yea, like many people in this thread. I'd just like to add, you don't have to block on migrating SVN history. It's actually enough to make sure that the SVN repo remains accessible indefinitely (if there's nothing secret in it, making a tarball of the SVN repo is a fine way to avoid running a server). I don't go through historic code often enough that it would be annoying to find a different repo when I need it, and half the time people's git conversions don't let me make sense of "This fixes a regression in r1234."

Of course, there are other options too, like migrating and then using replace, migrating and then rebasing, etc. I just want to point out that even the lowest effort option is valuable enough compared to throwing away history.

Post reply on HN