Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command failed: git gc #243

Open
ameenross opened this issue Mar 27, 2017 · 6 comments
Open

command failed: git gc #243

ameenross opened this issue Mar 27, 2017 · 6 comments

Comments

@ameenross
Copy link

Getting this error. Manually running git gc afterwards works. However, I don't really need the repo to be garbage collected (waste of CPU cycles in my usage scenario). Is there a CLI option to skip it?

@svigerske
Copy link

I'm also getting this message. In verbose mode, I get the following after the git fetch run

Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
Checked out HEAD:
  file:///***./trunk r374
Running command: git branch -l --no-color
* master
Running command: git branch -r --no-color
  svn/trunk
Running command: git config --local --get user.name
Running command: git config --local --get user.email
Running command: git checkout -f master
Already on 'master'
Running command: git gc
fatal: gc is already running on machine 'mangosteen' pid 13575 (use --force if not)
command failed:
git gc

And it is true that there is a git gc running under that pid. It looks that git gc is run twice by svn2git and the first one was still running in the background when the second one is started.

@dccarson
Copy link

Any chance of a some sort of workaround for this?

@svigerske
Copy link

I worked around this by disabling auto-run of garbage collect before using svn2git:

git config --global gc.auto 0

(and then reenable it after it git config --global --unset gc.auto)

@dccarson
Copy link

I've used svn2git successfully on several other repos. It only fails on one repo in my list, but it always fails on that one.

Thanks for the simple solution. I'll give it a try.

@dmoebius
Copy link

Got the same error, too, because of the circumstances @svigerske described.
IMHO it would be best to remove this last step of running "git gc", instead just print a message at the end of the migration saying that it would be best for the user to run "git gc" now, manually.

@dmoebius
Copy link

btw. this issue seems to be a duplicate of #180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants