Optimise the Commit objects creation
authorCatalin Marinas <catalin.marinas@gmail.com>
Thu, 18 Aug 2005 12:46:20 +0000 (13:46 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 18 Aug 2005 12:46:20 +0000 (13:46 +0100)
commit8e29bcd2fd67066143b88de8829130c6af043e2f
tree55deadfa03c6d1f7db0b33cbdeca31e764d903f2
parente4f41f5d393b5f1e83a39a42a5f204efb6ef7ea6
Optimise the Commit objects creation

The Commit objects are used for commands like 'series' to check whether
a patch is empty or not. Since the bottom of a patch is usually the same
as the top of the previous one, it makes sense to cache the Commit
objects and reduce their creation (and git-cat-file calls) to half. This
patch adds a Commit objects factory which caches the results.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/git.py
stgit/stack.py