From: Evan Broder Date: Wed, 24 Dec 2008 22:46:12 +0000 (-0500) Subject: As a result of Greg's and my git-svn based moves, many of the package X-Git-Url: http://xvm.mit.edu/gitweb/invirt/scripts/git-migration.git/commitdiff_plain/d79ec08f3fcc4078c41d571bfa2e91adec1c682c?ds=sidebyside As a result of Greg's and my git-svn based moves, many of the package directories ended up with a commit where every file in the repo was committed. Punt that repo from the newly revised history. svn path=/trunk/scripts/git-migration/; revision=1876 --- diff --git a/git-migrate b/git-migrate index f3ef98e..f10a512 100755 --- a/git-migrate +++ b/git-migrate @@ -24,6 +24,16 @@ def clonePackage(base, pkg): shutil.rmtree(pkg) subprocess.check_call(['git', 'config', 'core.bare', 'true'], cwd='%s.git' % pkg) + + # Some of these repos have a rev where everything was deleted + # as a result of the move. We don't want that rev to exist. + p = subprocess.Popen(['git', 'ls-files'], + cwd='%s.git' % pkg, + stdout=subprocess.PIPE) + p.wait() + if len(p.stdout.read()) == 0: + subprocess.check_call(['git', 'reset', 'HEAD^'], + cwd='%s.git' % pkg) def cloneAllPackages(base): for pkg in open('package-list'):