Tom Knowlton
asked on
C# - Find git repository programmatically - source code requested
In a C# windows form application, if I want to scan my entire hard drive and locate all of the git repositories that were created using "git clone [path_to_repository]". Of course I know where they all are already - I want to find the same repos programmatically. -- how would this best be done?
When a "git clone ..." command is run, are there always certain files created? Tell-tale ways to know a folder is a repo?
Is the presence of a hidden ".git" folder enough to pretty much a "guarantee" that I am inside a repository?
Please provide working C# source code.
When a "git clone ..." command is run, are there always certain files created? Tell-tale ways to know a folder is a repo?
Is the presence of a hidden ".git" folder enough to pretty much a "guarantee" that I am inside a repository?
Please provide working C# source code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well, no other takers, so you get the points, my friend.
My final solution was to not try and find the .git folders. It took such a long time to search the entire drive that it was not worth attempting a brute force approach. So I just have the user provide the git directory herself.
I will still consider your advice and will pursue it more if I think I need to.
Tom
My final solution was to not try and find the .git folders. It took such a long time to search the entire drive that it was not worth attempting a brute force approach. So I just have the user provide the git directory herself.
I will still consider your advice and will pursue it more if I think I need to.
Tom
ASKER