git.py: make git_dir an optional parameter
authorDavid Aguilar <davvid@gmail.com>
Fri, 30 May 2008 00:53:30 +0000 (17:53 -0700)
committerDavid Aguilar <davvid@gmail.com>
Fri, 30 May 2008 00:53:30 +0000 (17:53 -0700)
commitcbbb6b349e8d0557e7e55e2d05819d6bdaed3769
tree2ebb7aac2e26486ae352418e011c7240ffdc4c5c
parentebee400cfa4a532018ee904c22c7e3e6619ca4de
git.py: make git_dir an optional parameter

git_dir is now optional in the constructor for git.Git.
Git now falls back to os.getcwd() when git_dir is not specified.

Furthermore, extra checks were added so that the git_dir
variable always points to the root of the worktree for
non-bare repositories.

Signed-off-by: David Aguilar <davvid@gmail.com>
lib/git_python/git.py