Forums : Technical Issue Help

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.blackduck.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at info@openhub.net

brand new project with huge negative lines of code!

Hi,

I just registered the Coda project last night and added the 5 git repositories today.

It looks like Coda has -190KLOC of C and -232KLOC of C++. Bug?

Anonymous Coward almost 17 years ago
 

Whoah! Tres bizarre. Am currently investigating.

Robin Luckey almost 17 years ago
 

Hi Adam,

It looks like git://coda.cs.cmu.edu/project/coda/dev/coda.git has a few problems, probably from a buggy conversion from CVS.

There are a few commits that indicate that nearly the entire tree was deleted, when this was in fact not the case. Since our counter constructs the current codebase size by stepping forward through all commits, these erroneous delete events cause us to end up with a net negative total lines of code.

For example, look at commit 78e7f79d4c8f9abbf270406272aea5ef8b9a0b04:

git whatchanged 78e7f79d4c8f9abbf270406272aea5ef8b9a0b04

This commit reports that nearly every file in the tree was deleted -- and I suspect this is not actually true.

If you examine the commits following this, you'll see that the git log acts as if the files were never actually deleted.

Interestingly, some files in this commit are reported as modified rather than deleted, and I suspect that these files actually were modified, and the CVS conversion tool mistakenly deleted everything else.

I think there are a couple of other massive delete commits like this, but they're a bit time-consuming to track down.

As long as the git repository has inconsistent history like this, I think it's unlikely that we can construct a valid code size from it.

I'd be curious how you created this repository, and if you can confirm what I've found.

Thanks,
Robin

Robin Luckey almost 17 years ago
 

Actually buggy usage of CVS, the early CVS history was badly mangled as a result of renaming and hand-editing files in the repository. The git tree was created by a parsecvs combined with a lot of cleaning up of these types of bad branches. I'll see if I can rewrite history to make a little more sense.

On the other hand, the history is technically correct. the developer checked out the repository removed everything he didn't want to work on and committed the result to his own branch. Then worked on the branch for a while and finally merged his changes back into the main tree, recreating the files that were lost on his branch.

Jan Harkes almost 17 years ago
 

I will probably not be rewriting history for this. I expect the same thing will happen when the forked off lwp, rpc2 and rvm libraries, which are currently independent repositories, are merged back into the main source tree which I expect to happen at some future date.

There is a fundamental issue with the way additions/deletions are counted. Yes, thousands of lines of code were removed in that branch of the code. But they were indirectly re-added when the branch was merged back because the code survived in the (in this case main-line) branch.

Jan Harkes almost 17 years ago