#583685 git-filter-branch: always calls git-read-tree even when not needed

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Frédéric Brière
Date:
2010-05-29 15:48:05 UTC
Severity:
wishlist
#583685#5
Date:
2010-05-29 15:11:17 UTC
From:
To:
git-filter-branch always calls git-read-tree for each commit, even when
no modifications to the index are performed.  Admittedly, read-tree is
not as costly an operation as checkout-index, but on a big repo, it is
not free either.

For example, I use Git to perform rolling backups of my home, with
daily/weekly/monthly branches.  (At least, that's the plan.)  After a
while, I reparent those branches to get rid of the oldest commits.  This
should be quite snappy, but due to read-index processing 37000+ entries
for each commit, it's actually quite painful.

#583685#10
Date:
2010-05-29 15:44:28 UTC
From:
To:
tags 583685 + upstream
severity 583685 wishlist
quit

Frédéric Brière wrote:

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 88fb0f0..3a303c7 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -287,11 +287,7 @@ test $commits -eq 0 && die "Found nothing to rewrite"

 # Rewrite the commits