Also, I changed Get-GitDirectory to use a Test-LocalOrParentPath
method to look for the .git directory in native powershell because it
seems to be faster than calling git to ask if we're in a git
repository.
function Test-LocalOrParentPath($path) {
$done = $false
do {
if (Test-Path $path) { return $true }
if (Test-Path ..) { return $false }
$path = "..\$path"
} while (!$done)
return $false
}
# usage is "Test-LocalOrParentPath .git"
I'm liking where this is going.
On Mar 29, 8:30 am, Keith Dahlby <dahl...@gmail.com> wrote:
> Over the weekend I tagged a v0.1 release, described in a bit more detail
> here:http://www.lostechies.com/blogs/dahlbyk/archive/2010/03/27/posh-git-r...
>
> At the end of that post I list several possible next steps:
>
> - Testing! I'd like to figure out a way to run some integration tests
> that verify a given repository state renders the expected prompt. If you
> have suggestions how to approach this, or know how other Git integration
> projects are tested, please let us know over at the Google Group.
> - Documentation! How to get started, what the project provides, etc.
> - Expanded Tab Completion! Common config options, stashes, long command
--To unsubscribe, reply using "remove me" as the subject.
Just committed my changes by the way (see http://github.com/drmohundro/posh-git).
Any feelings on going with a module based versus script based
approach?
On Mar 31, 8:46 am, Mark Embling <cont...@markembling.info> wrote:
> Interesting that you've taken that approach regarding the .git directory
> check. My original version right back at the beginning used a method along
> those lines (albeit a less sophisticated variation), and was pleased to see
> something more "correct". However I too have experienced less than optimal
> speed as a result.
>
> Out of interest, are you using the latest msysgit (1.7) or an older 1.6.x
> release?
>