Pushing some commits to the remote gives a rather weird message:
$ GIT_TRACE=2 git push
trace: built-in: git 'push'
trace: run_command: 'ssh' 'gitserver' 'git-receive-pack '\''~/git/test'\'''
trace: run_command: 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset'
trace: exec: 'git' 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset'
trace: built-in: git 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset'
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 598 bytes, done.
Total 6 (delta 3), reused 0 (delta 0)
Auto packing the repository for optimum performance.
git: 'repack' is not a git command. See 'git --help'.
error: failed to run repack
To gitserver:~/git/test
ad2b6ed..2a31eea master -> master
So repack is not recognized. But 'repack' is recognized when doing a git gc:
$ GIT_TRACE=2 git gc
trace: built-in: git 'gc'
trace: run_command: 'pack-refs' '--all' '--prune'
trace: exec: 'git' 'pack-refs' '--all' '--prune'
trace: built-in: git 'pack-refs' '--all' '--prune'
trace: run_command: 'reflog' 'expire' '--all'
trace: exec: 'git' 'reflog' 'expire' '--all'
trace: built-in: git 'reflog' 'expire' '--all'
trace: run_command: 'repack' '-d' '-l' '-A'
trace: exec: 'git' 'repack' '-d' '-l' '-A'
trace: exec: 'git-repack' '-d' '-l' '-A'
trace: run_command: 'git-repack' '-d' '-l' '-A'
...
And a 'git push' right after a 'git gc' again gives the error: failed to run repack开发者_JS百科.
$ git --version
git version 1.7.0.4
$ uname -a
Linux lin 2.6.32-28-generic-pae #55-Ubuntu SMP Mon Jan 10 22:34:08 UTC 2011 i686 GNU/Linux
Is the push just not optimal, or is there something wrong?
- Paul
The error is occurring on the server and not on your client. What version of git is installed on the server? Was git installed on the server using the distros package manager or was it installed from source possibly in a non standard location?
Is the server managed by you? Maybe somebody thought they could only install a subset of the git commands because it was only going to be used as a server.
精彩评论