cvsimport: move over to using git-for-each-ref to read refs.
commit1f24c58724a64e7b100ae8d8e0318c9e564df88b
authorAndy Whitcroft <apw@shadowen.org>
Wed, 20 Sep 2006 16:37:04 +0000 (20 17:37 +0100)
committerJunio C Hamano <junkio@cox.net>
Wed, 20 Sep 2006 17:21:46 +0000 (20 10:21 -0700)
tree377899388ab1b981873ac8d34d9e818290393f06
parent9f613ddd21cbd05bfc139d9b1551b5780aa171f6
cvsimport: move over to using git-for-each-ref to read refs.

cvsimport opens all of the files in $GIT_DIR/refs/heads and reads
out the sha1's in order to work out what time the last commit on
that branch was made (in CVS) thus allowing incremental updates.
However, this takes no account of hierachical refs naming producing
the following error for each directory in $GIT_DIR/refs:

  Use of uninitialized value in chomp at /usr/bin/git-cvsimport line 503.
  Use of uninitialized value in concatenation (.) or string at
/usr/bin/git-cvsimport line 505.
  usage: git-cat-file [-t|-s|-e|-p|<type>] <sha1>

Take advantage of the new packed refs work to use the new
for-each-ref iterator to get this information.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsimport.perl