github/git-sizer

Recommend the help and README mention that this is for local git repos only.

mrT55 opened this issue · 2 comments

mrT55 commented

Nice tool.
Now considering that git is often used both locally and remotely I think some users would find it helpful if some brief mention that git-sizer is for collecting statistics about a local git repository only.

A future enhancement suggestion may be to have git-sizer optionally interrogate a remote git
repository for the purpose of determining ahead of time if the user is about to clone
a very large repository.

Thanks again for making git-sizer available.
mrT

mrT55 commented

Additional suggestion for documentation:
When a git repo. is created via 'git clone --depth=1 ...' the '--depth=1' creates a shallow clone.
git-sizer seems report: 'full clone required' on such a repo.

@mrT55: thanks for your feedback.

Now considering that git is often used both locally and remotely I think some users would find it helpful if some brief mention that git-sizer is for collecting statistics about a local git repository only.

When a git repo. is created via 'git clone --depth=1 ...' the '--depth=1' creates a shallow clone.
git-sizer seems report: 'full clone required' on such a repo.

Step 3 of the "Getting started" instructions says

3. Change to the directory containing a full, non-shallow clone of the Git repository that you'd like to analyze.

which covers both of those points (though somewhat obliquely). So apparently we should make that information more prominent. If you have an idea for how to change the README file so that this information would be harder to overlook, feel free to submit a pull request.

A future enhancement suggestion may be to have git-sizer optionally interrogate a remote git
repository for the purpose of determining ahead of time if the user is about to clone
a very large repository.

That would be handy if there were an easy way to implement it. But I don't think that the Git protocol allows you to inquire about the size of a repository, short of actually cloning it. So I think that the only way to implement this feature would be to recognize which hosting site the repository is on (if it's even a known one) and use site-specific APIs or other tricks to inquire about the size. This would be tricky to implement and would only cover the sites that we teach git-sizer to recognize and that have the required API. And even then, we could only tell the user how big the repo is; they'd still have to clone the repo if they want to actually run git-sizer against it. So I don't think that this feature would be worth the implementation and maintenance effort.