diff options
author | David Aguilar <davvid@gmail.com> | 2008-06-15 16:45:29 -0700 |
---|---|---|
committer | David Aguilar <davvid@gmail.com> | 2008-06-15 16:45:29 -0700 |
commit | fd5f111439e7a2e730b602a155aa533c68badbf8 (patch) | |
tree | a9d2ae2b7b1fcc63fa75dac8d9134f749940e8de /lib/git/commit.py | |
parent | abc2e538c6f2fe50f93e6c3fe927236bb41f94f4 (diff) | |
download | gitpython-fd5f111439e7a2e730b602a155aa533c68badbf8.tar.gz |
cmd: better support for bare repositories
In order to avoid the expense of parsing .git/config
just to know whether or not a repository is bare
at __init__ time, we just pass an optional flag to
Git.__init__():
bare_repo with a default value of False.
Repo.init_bare() was updated to pass this flag.
We could have an optional Git.read_bare_status() function
that does the expensive lookup. Then, users can optionally
call it at runtime if they really need to know whether or not
a repository is bare. That seems like a decent tradeoff between
speed, correctness, and common use cases.
Signed-off-by: David Aguilar <davvid@gmail.com>
Diffstat (limited to 'lib/git/commit.py')
0 files changed, 0 insertions, 0 deletions