Re: [msysGit] Git repack is not a command

254 views
Skip to first unread message

Konstantin Khomoutov

unread,
Apr 16, 2013, 12:32:19 PM4/16/13
to chris.ma...@gmail.com, msy...@googlegroups.com
On Tue, 16 Apr 2013 08:34:07 -0700 (PDT)
chris.ma...@gmail.com wrote:

[...]
> git: 'repack' is not a git command. See 'git --help'.
[...]
> I have read elsewhere that the repack command mentioned here is
> actually a remote operation. So does that mean there is a problem
> with the installation of msysgit on my server? Locally I am just
> running git for linux.

Check if the file "git-repack" is present under
%ProgramFiles%Git\libexec\git-core directory.

(This is a Unix shell script so it doesn't have an .exe extension.)

Chris Malloy

unread,
Apr 16, 2013, 1:04:12 PM4/16/13
to msy...@googlegroups.com, chris.ma...@gmail.com
Yes, that file is present. There is a local clone on the server for nightly builds and typing "git repack" into bash works there as well.

Konstantin Khomoutov

unread,
Apr 16, 2013, 1:16:40 PM4/16/13
to Chris Malloy, msy...@googlegroups.com
On Tue, 16 Apr 2013 10:04:12 -0700 (PDT)
Chris Malloy <chris.ma...@gmail.com> wrote:

[...]
> > > git: 'repack' is not a git command. See 'git --help'.
> > [...]
> > > I have read elsewhere that the repack command mentioned here is
> > > actually a remote operation. So does that mean there is a problem
> > > with the installation of msysgit on my server? Locally I am just
> > > running git for linux.
> >
> > Check if the file "git-repack" is present under
> > %ProgramFiles%Git\libexec\git-core directory.
> >
> > (This is a Unix shell script so it doesn't have an .exe extension.)
> >
> Yes, that file is present. There is a local clone on the server for
> nightly builds and typing "git repack" into bash works there as well.

Does Git prints anything relevant to what is run on the server
if you run it on the client while having
GIT_TRACE=1
in the environment?

P.S.
Please don't top-post -- this breaks the discussion flow, which sucks.

Chris Malloy

unread,
Apr 16, 2013, 1:46:02 PM4/16/13
to msy...@googlegroups.com, Chris Malloy
trace: built-in: git 'receive-pack' [redacted]
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 224 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
trace: run_command: 'unpack-objects' '--pack_header=2,2'
trace: built-in: git 'unpack-objects' '--pack_header=2,2'
trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all'
trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all'
trace: run_command: 'hooks/post-update' 'refs/heads/master'
trace: run_command: 'gc' '--auto' '--quiet'
trace: built-in: git 'gc' '--auto' '--quiet'
trace: run_command: 'pack-refs' '--all' '--prune'
Auto packing the repository for optimum performance.
trace: built-in: git 'pack-refs' '--all' '--prune'
trace: run_command: 'reflog' 'expire' '--all'
trace: built-in: git 'reflog' 'expire' '--all'
trace: run_command: 'repack' '-d' '-l' '-q' '-A' '--unpack-unreachable=2.weeks.ago'
trace: exec: 'git-repack' '-d' '-l' '-q' '-A' '--unpack-unreachable=2.weeks.ago'
trace: run_command: 'git-repack' '-d' '-l' '-q' '-A' '--unpack-unreachable=2.weeks.ago'
git: 'repack' is not a git command. See 'git --help'.
error: failed to run repack
To [redacted]
   9cfdd31..5920b65  master -> master

 

Chris Malloy

unread,
Apr 16, 2013, 1:56:04 PM4/16/13
to msy...@googlegroups.com, Chris Malloy
What is also interesting is if I try to do a git push on my server locally it seems as if the command hangs during the repack stage.

trace: built-in: git 'push'
trace: run_command: 'git-receive-pack '\''c:\[redacted].git'\'''
trace: built-in: git 'receive-pack' 'c:\[redacted].git'
trace: run_command: 'pack-objects' '--all-progress-implied' '--revs' '--stdout'
'--thin' '--delta-base-offset' '--progress'
trace: built-in: git 'pack-objects' '--all-progress-implied' '--revs' '--stdout'
 '--thin' '--delta-base-offset' '--progress'
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writtrace: run_command: 'unpack-objects' '--pack_header=2,2'
ing objects: 100% (2/2), 221 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: trace: built-in: git 'unpack-objects' '--pack_header=2,2'
trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all'
trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all'
trace: run_command: 'hooks/post-update' 'refs/heads/master'
trace: run_command: 'gc' '--auto' '--quiet'
trace: built-in: git 'gc' '--auto' '--quiet'
trace: run_command: 'pack-refs' '--all' '--prune'
trace: built-in: git 'pack-refs' '--all' '--prune'
trace: run_command: 'reflog' 'expire' '--all'
trace: built-in: git 'reflog' 'expire' '--all'
trace: run_command: 'repack' '-d' '-l' '-q' '-A' '--unpack-unreachable=2.weeks.a
go'
trace: exec: 'git-repack' '-d' '-l' '-q' '-A' '--unpack-unreachable=2.weeks.ago'

trace: run_command: 'git-repack' '-d' '-l' '-q' '-A' '--unpack-unreachable=2.wee
ks.ago'
trace: built-in: git 'rev-parse' '--parseopt' '--' '-d' '-l' '-q' '-A' '--unpack
-unreachable=2.weeks.ago'
trace: built-in: git 'rev-parse' '--git-dir'
trace: built-in: git 'config' '--bool' 'repack.usedeltabaseoffset'
trace: built-in: git 'pack-objects' '--keep-true-parents' '--honor-pack-keep' '-
-non-empty' '--all' '--reflog' '--unpack-unreachable=2.weeks.ago' '--local' '-q'
 '--delta-base-offset' 'c:/[redacted].git/objects/pack/.tmp-388-p
ack' 

It will hang here until I send ^C. I was starting to think this was an ssh problem, but since this is just using the file system that cannot be the case.

Konstantin Khomoutov

unread,
Apr 16, 2013, 6:11:47 PM4/16/13
to Chris Malloy, msy...@googlegroups.com
On Tue, Apr 16, 2013 at 10:46:02AM -0700, Chris Malloy wrote:

[...]
> trace: run_command: 'repack' '-d' '-l' '-q' '-A'
> '--unpack-unreachable=2.weeks.ago'
> trace: exec: 'git-repack' '-d' '-l' '-q' '-A'
> '--unpack-unreachable=2.weeks.ago'
> trace: run_command: 'git-repack' '-d' '-l' '-q' '-A'
> '--unpack-unreachable=2.weeks.ago'
> git: 'repack' is not a git command. See 'git --help'.
> error: failed to run repack
> To [redacted]
> 9cfdd31..5920b65 master -> master

I have to think further on this issue, but might this [1] explain your
problem? The basic idea is that the problem actually happens on the
server due to a server's misconfiguration.

Also see this [2] -- as odd as it might seem, this problem
appears to be rather common.

1. http://stackoverflow.com/q/4863092/720999
2. http://stackoverflow.com/search?q=[git]+repack+is+not+a+git+command

Chris Malloy

unread,
Apr 17, 2013, 9:27:06 AM4/17/13
to Konstantin Khomoutov, msy...@googlegroups.com
Yes I had searched this previously. Since the repack command hangs on the server it may be a corrupt pack. I'll try to restore the server repo from a local one.
Reply all
Reply to author
Forward
0 new messages