[PATCH 1/2] filter-branch: remove an unnecessary use of 'git read-tree'

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Sixt
Date: Tuesday, December 15, 2009 - 1:42 am

From: Johannes Sixt <j6t@kdbg.org>

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>
---
 Calling read-tree without arguments is not allowed according to the
 documentation. The next patch will enforce this.

 -- Hannes

 git-filter-branch.sh |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index cb9d202..195b5ef 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -259,7 +259,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"
-- 
1.6.6.rc1.46.g1635

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] filter-branch: remove an unnecessary use of 'g ..., Johannes Sixt, (Tue Dec 15, 1:42 am)
Re: [PATCH 1/2] filter-branch: remove an unnecessary use o ..., Johannes Schindelin, (Tue Dec 15, 10:19 am)
Re: [PATCH 2/2] read-tree: at least one tree-ish argument ..., Sverre Rabbelier, (Fri Dec 18, 12:24 pm)
Re: [PATCH 2/2] read-tree: at least one tree-ish argument ..., Sverre Rabbelier, (Fri Dec 18, 12:37 pm)
Re: [PATCH 2/2] read-tree: at least one tree-ish argument ..., Sverre Rabbelier, (Fri Dec 18, 12:59 pm)
Re: [PATCH 2/2] read-tree: at least one tree-ish argument ..., Sverre Rabbelier, (Fri Dec 18, 1:21 pm)
Re: [PATCH 2/2] read-tree: at least one tree-ish argument ..., Nanako Shiraishi, (Fri Dec 18, 8:25 pm)
Re: [PATCH 2/2] read-tree: at least one tree-ish argument ..., Johannes Schindelin, (Sat Dec 19, 3:56 am)