otac0n / WebGitNet

WebGit .NET is an ASP.NET MVC app that provides access to your git repositories over HTTP. It supports browsing in a web browser AND push / pull over Git's "Smart HTTP protocol".
zlib License
133 stars 62 forks source link

Fixed issue with WebGitNet directory detection / creation #69

Closed gregsohl closed 11 years ago

gregsohl commented 11 years ago

When a non-existing path was specified in the URL, it would be created in the process of testing for / creating a info/WebGitNet path under it. Fixed to only create when the path exists and is known to be a repo. For example, browsing to:

http://localhost/Content/XXX

would cause a folder structure XXX/info/WebGitNet to be created under the base repository folder. This was occurring in GitUtilities.RepoInfoPath

Also, simplified and encapsulated the testing for if a folder is a repo and testing to see if the repo is bare.

otac0n commented 11 years ago

I'm inclined to merge this in. I'll look it over when I'm home.

gregsohl commented 11 years ago

Thanks. Give it a good code review! I had one done internally before I pushed. I started using it in production today.