Skip to content

Commit

Permalink
filter-branch: remove an unnecessary use of 'git read-tree'
Browse files Browse the repository at this point in the history
The intent of this particular call to 'git read-tree' was to fill an
index. But in fact, it only allocated an empty index. Later in the
program, the index is filled anyway by calling read-tree with specific
commits, and considering that elsewhere the index is even removed (i.e.,
it is not relied upon that the index file exists), this first call of
read-tree is completely redundant.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Dec 16, 2009
1 parent 9861b64 commit 7ee6376
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion git-filter-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ test -s "$tempdir"/heads ||

GIT_INDEX_FILE="$(pwd)/../index"
export GIT_INDEX_FILE
git read-tree || die "Could not seed the index"

# map old->new commit ids for rewriting parents
mkdir ../map || die "Could not create map/ directory"
Expand Down

0 comments on commit 7ee6376

Please sign in to comment.