Search for git path recursively #1

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@frygge
frygge commented Nov 9, 2011

Hi,

the above mentioned feature was just a small issue when i saw gource today the first time. I really like that program, but i wanted it to automatically go to the top git directory (e.g. when i'm in the src directory and like to run gource). Here just a hint in form of code. Perhaps you could introduce such a feature?

@acaudwell

Hi. This is a good idea.

Could you maybe generalize this into findRepositoryRoot( logfile, ".git" ) and make it a method of CommitLog, and then all the VCS can use it.

It might also be a bit brittle right now. Maybe you should append the ../ to the path, get stat to confirm it is a directory, then test for the sub directory name.

Thanks!

@acaudwell acaudwell closed this Jan 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment