Create index and worktree objects just once
authorKarl Hasselström <kha@treskal.com>
Sun, 27 Jan 2008 08:06:15 +0000 (09:06 +0100)
committerKarl Hasselström <kha@treskal.com>
Tue, 29 Jan 2008 03:26:13 +0000 (04:26 +0100)
commita0848ecfc1bee1de93d47e15c9cc3ec49b5a6516
tree645b43c99da20031a97909ec63fdb4154defbf10
parent0b635fe6d38b6ca33a51056d00dd8431a3e2a116
Create index and worktree objects just once

Create the objects for a repository's default index, worktree, and
index+worktree just once. Both for performance (though the gain is
probably negligible), and for future-proofing if we ever add mutable
state to those objects.

And make them properties while we're at it.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/commands/coalesce.py
stgit/commands/commit.py
stgit/commands/goto.py
stgit/lib/git.py