Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

v0.1 Released

2 views
Skip to first unread message

Keith Dahlby

unread,
Mar 29, 2010, 9:30:57 AM3/29/10
to posh...@googlegroups.com
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-release-v0-1.aspx

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 options (--interactive and such), the list goes on. The Bash implementation needs 2300 lines; we're at 128 so far.
Thoughts? Other feature requests?

David Mohundro

unread,
Mar 31, 2010, 9:40:17 AM3/31/10
to posh-git
I'm working on converting your latest posh-git changes to be a module
- might help with packaging and loading posh-git (i.e. to use, just
import-module posh-git). I'm tracking down a few bugs on my side, but
I should have a commit soon if there is interest in it.

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

Mark Embling

unread,
Mar 31, 2010, 9:46:02 AM3/31/10
to posh...@googlegroups.com
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?

--
To unsubscribe, reply using "remove me" as the subject.

David Mohundro

unread,
Mar 31, 2010, 9:48:42 AM3/31/10
to posh-git
I'm running 'git version 1.7.0.2.msysgit.0' right now. I'm curious if
future releases of msysgit will be faster which would make this a non-
issue.

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?
>

Mark Embling

unread,
Mar 31, 2010, 9:49:59 AM3/31/10
to posh...@googlegroups.com
I experienced a noticeable drop in speed between 1.6.x and 1.7. I'm hoping it will go back to its original fast (and fully working) self on the next release.

Jeremy Skinner

unread,
Mar 31, 2010, 9:51:14 AM3/31/10
to posh...@googlegroups.com
I like the idea of using a module.

Jeremy

Mark Embling

unread,
Mar 31, 2010, 9:52:34 AM3/31/10
to posh...@googlegroups.com
+1 to the use of a module. It seems a pretty good idea to me.

Mark Embling

unread,
Mar 31, 2010, 10:36:08 AM3/31/10
to posh...@googlegroups.com
I've pulled your changes into my fork (http://github.com/markembling/posh-git) and have just finished playing with it now. Having it as a module certainly makes loading it a lot easier and makes the whole thing more portable. I do not have my copy of posh-git directly inside my PowerShell profile directory (unlike many people I would guess - it makes development of it rather a pain), but rather within a subdirectory thereof. Module-izing it has elliminated problems with Utils.ps1 being attempted to be loaded from the wrong place, which is a problem I had to work around before.

I must admit that before today I had no knowledge of PowerShell modules, their existence or their purpose. If anyone else is in the same boat, this is a useful resource. Just one more reason to love PowerShell.

Thanks,
Mark

Keith Dahlby

unread,
Mar 31, 2010, 11:00:36 AM3/31/10
to posh...@googlegroups.com
+1 on the module, I'll pull that in tonight - I knew we should go in that direction at some point, so thanks for taking that step.

When I first started hacking on Mark and Jeremy's stuff I probably went too far in the direction of favoring a git source of information rather than just looking at the file system. A first step back in that direction was looking at .\.git; your version is even better.

Cheers ~
Keith

Keith Dahlby

unread,
Apr 2, 2010, 4:28:44 AM4/2/10
to posh...@googlegroups.com
I've pulled this into my fork with the additional change of restoring the pushd/popd to the example profile and having it import the module from the current directory. Part of this is selfish - for development I just load the example profile into my profile from my working copy - and part because if the user is actually using the example profile unedited it's probably in the same directory as the module.

# Load posh-git module from current directory
Import-Module .\posh-git

# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
# Import-Module posh-git

Thoughts?

David Mohundro

unread,
Apr 2, 2010, 8:17:55 AM4/2/10
to posh...@googlegroups.com
That works for me - I had created a junction from the module directory to my development directory, but your solution is a lot friendlier.
Reply all
Reply to author
Forward
0 new messages