clean-git without --force DOES change the repo

Issue #6 new
Justin Clift created an issue

Kicked off the dry-run clean-git command as per the tutorial, which both in the tutorial + the command itself states won't change the repo.

eg:

$ java -Dfile.encoding=utf-8 -jar ../svn-migration-scripts.jar clean-git
###########################################################
#         This is a dry run, add --force to commit        #
#        No changes will be made to your repository       #
###########################################################
# Creating annotated tags...
# Creating local branches...
Creating the local branch 'git-svn' for Subversion branch 'refs/remotes/git-svn'.
# Checking for obsolete tags...
No obsolete tags to remove.
# Checking for obsolete branches...
No obsolete branches to remove.
# Cleaning tag names
# Cleaning branch names
###########################################################
#         This is a dry run, add --force to commit        #
#        No changes will be made to your repository       #
###########################################################

Looking at "ps -ef f" (on Linux) to see why it's taking so long shows this:

jc        2105  1987  0 12:24 pts/7    Sl+    0:00  |   \_ java -Dfile.encoding=utf-8 -jar ../svn-migration-scripts.jar clean-git
jc        2177  2105  0 12:24 pts/7    S+     0:00  |       \_ git gc --prune=now
jc        2184  2177  0 12:24 pts/7    S+     0:00  |           \_ git repack -d -l -a
jc        2185  2184 99 12:24 pts/7    Sl+   14:32  |               \_ git pack-objects --keep-true-parents --honor-pack-keep --non-empty --all --r
eflog --local --delta-base-offset .git/objects/pack/.tmp-2184-pack

So, it's actually kicked off a git gc (garbage collect). Which absolutely does change the repo. And for this repo (several GB's), it takes several hours to finish.

Please either update the clean-git "dry-run" command to not change the repo (as it states it won't), or remove the bogus message saying it won't. ;)

This is on Fedora 21 using:

  • git version 2.1.0
  • OpenJDK 1.8.0_25
  • Subversion 1.8.10

Comments (1)

  1. Log in to comment