0

I want to know if is possible check how many time in mean a line of code is keeping in the repo.

For example

In some repositories, somebody appends new features, but they are deleted early, because there was a wrong analysis for example.

Any idea if there are any tools in order to check this in a git repository?

Kind regards.

Tlaloc-ES
  • 4,825
  • 7
  • 38
  • 84

1 Answers1

1

Use the right tool for the job.

A software feature can span multiple source files, can be refactored (moved within a file or into another file), disabled through settings or unused through a function call not being executed, can introduce shared functionality (in yet another file or two) that remains even if the feature gets removed, and so on.

What kind of metrics are you really looking for? Looks like an issue tracker or other project management software is a better match for your actual problem.

As for your actual question: see Retrieve the commit log for a specific line in a file?, for example.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
  • In general, in some repositories, there is a bad analysis and I am looking to check the mean life of a line of code, about a function, about a graphql schema etc..., per folder, per hole project etc... I can understand that there are refactors, and that can generate a bias, but, anyway, a refactor could be a bad analysis to, so – Tlaloc-ES Oct 07 '21 at 11:33