visevol / GithubVisualisation

PFE028 Été 2024
MIT License
0 stars 1 forks source link

[Backend] Implement a Gitland command that returns the file listing of a repository with the with line count #47

Closed zergov closed 3 days ago

zergov commented 3 days ago

Change the LsTree Gitland command so that it list the file tree with the line number of each file, instead of the size of each file.

Apparently, the 4b825dc642cb6eb9a060e54bf8d69288fbee4904 hash represents an empty directory in Git. This means we can diff the current repository with this hash to get the diff of line numbers for each file. Because the 4b825dc642cb6eb9a060e54bf8d69288fbee4904 represents an empty directory, by definition the added lines in the diff is the line number of that file.