That would be a nice enhancement. Patches welcome. :) On Mon, Apr 20, 2009 at 1:57 PM, Ian Petersen <[email protected]> wrote:
> > Can I suggest checking for $GIT_DIR in the environment? I'm using Git > beside another system at work and, in order to play along better with > the other system, I don't have a .git directory inside my workspace. > Instead, I have a completely separate Git repository and all the Git > tools find it via $GIT_DIR. The algorithm below would fail in my > case. > > Ian > > On Mon, Apr 20, 2009 at 10:50 AM, Scott Blum <[email protected]> wrote: > > May I suggest we just do this? > > static boolean looksLikeGit(File dir) { > > if (looksLikeSvn(dir)) { > > // Prefer svn to git. > > return false; > > } > > dir = dir.getAbsoluteFile(); > > while (dir != null) { > > if (new File(dir, ".git").isDirectory()) { > > return true; > > } > > dir = dir.getParentFile(); > > } > > return false; > > } > > On Mon, Apr 20, 2009 at 1:17 PM, Eric Ayers <[email protected]> wrote: > >> > >> @Freeland, Scott, > >> > >> I have an oddball case where I have been using GIT in my project, but > not > >> GIT-SVN. In fact, I didn't even have the 'svn' version of git > installed > >> until I hit this bump trying to run tests. > >> > >> The task mistakenly thinks that commands like git svn info will work. > My > >> proposes solution to this is to add an additional check for a '.git/svn' > >> directory. > >> > >> (Patch attached vs r5261) > >> > >> -- > >> Eric Z. Ayers - GWT Team - Atlanta, GA USA > >> http://code.google.com/webtoolkit/ > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
