All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] filter-branch: remove an unnecessary use of 'git read-tree'
@ 2009-12-15  8:42 Johannes Sixt
  2009-12-15  8:43 ` [PATCH 2/2] read-tree: at least one tree-ish argument is required Johannes Sixt
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Johannes Sixt @ 2009-12-15  8:42 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, Git Mailing List

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-12-19 10:51 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15  8:42 [PATCH 1/2] filter-branch: remove an unnecessary use of 'git read-tree' Johannes Sixt
2009-12-15  8:43 ` [PATCH 2/2] read-tree: at least one tree-ish argument is required Johannes Sixt
2009-12-18  9:51   ` Johannes Sixt
2009-12-18 18:11     ` Junio C Hamano
2009-12-18 19:04       ` Johannes Sixt
2009-12-18 19:24         ` Sverre Rabbelier
2009-12-18 19:32         ` Junio C Hamano
2009-12-18 19:37           ` Sverre Rabbelier
2009-12-18 19:49             ` Junio C Hamano
2009-12-18 19:59               ` Sverre Rabbelier
2009-12-18 20:13                 ` Junio C Hamano
2009-12-18 20:21                   ` Sverre Rabbelier
2009-12-18 22:04               ` Johannes Sixt
2009-12-18 22:17                 ` Jakub Narebski
2009-12-18 23:46                   ` Junio C Hamano
2009-12-19  3:25                     ` Nanako Shiraishi
2009-12-19  4:43                       ` Junio C Hamano
2009-12-19  4:53                         ` Junio C Hamano
2009-12-19 10:56                           ` Johannes Schindelin
2009-12-15 17:19 ` [PATCH 1/2] filter-branch: remove an unnecessary use of 'git read-tree' Johannes Schindelin
2009-12-16  0:19 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.