[Azure DevOps API] Get line count in Repo

Copper Contributor

Hi,

 

I'd like to get the line count of the files inside a ADO repo (remote) as it would be achievable with the command locally:

git diff --shortstat 4b825dc642cb6eb9a060e54bf8d69288fbee4904

Currently I've tried it via ADO API but with no success to get same result.

4 Replies

@leonardomoreira 

 

Any return message? 

Nothing yet.
You mean get content of each and count the lines? I’ve tried it, should work but sometimes the API fails (guess due to many requests) but anyways what i’m looking for is something with less compute requirements and quicker. So far the best option is to clone the repo and the run the diff or count lines script.