[FFmpeg-trac] #7655(website:new): git shallow clone is not working

FFmpeg trac at avcodec.org
Sun Jan 6 19:21:02 EET 2019


#7655: git shallow clone is not working
-------------------------------------+-------------------------------------
             Reporter:  milaxnuts    |                     Type:  defect
               Status:  new          |                 Priority:  minor
            Component:  website      |                  Version:
             Keywords:  git shallow  |  unspecified
  clone                              |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 I want to do a 'git shallow clone' of the ffmpeg repo,
 to compile ffmpeg with libfdk_aac. [boo GPL.]

 While the default 'git clone' works fine with ...
 {{{
 Receiving objects: 100% (560754/560754), 132.69 MiB | 2.79 MiB/s, done.
 }}}
 ... the 'shallow clone' fails:

 How to reproduce:

 {{{
 $ git clone --depth=1 https://git.ffmpeg.org/ffmpeg.git
 Cloning into 'ffmpeg'...
 fatal: the remote end hung up unexpectedly
 fatal: protocol error: bad pack header
 }}}

 Probably related:
 https://bugs.launchpad.net/linaro-infrastructure-misc/+bug/1253139
 > From Apache log, when trying to clone a repository, we can find this:
 >
 > fatal: Unable to create temporary file '/srv/repositories/lava/lava-
 server.git/shallow_zjbO0B': Permission denied
 >
 > The repository directories under /srv/repositories on the server are set
 with the following access: rwxr-----, and are owned by git:git.
 >
 > The process that runs git during a clone operation via smart HTTP is run
 under www-data, and www-data is part of the git group on the server, but
 does not have write access to the directories.
 >
 > Just changing the permission on the directory solved the problem, and I
 was able to perform a clone operation.

 .

 Why shallow clone:

 cos it saves bandwidth.

 when i do a local shallow clone ...
 {{{
 $ git clone --depth=1 ffmpeg-full ffmpeg-shallow
 Receiving objects: 100% (6934/6934), 14.57 MiB | 8.15 MiB/s, done.
 }}}
 ... then i need almost 10 times less traffic.

 Why not 'greedy' shallow clone?

 greedy as in depth=1 compared to like depth=50

 https://bugs.eclipse.org/bugs/show_bug.cgi?id=436543

 > There are edge cases which could cause build issues when you have a
 really low depth. Such as if you are using polling based build triggers
 and multiple changes are happening rapidly, your build may miss a few
 commits.

 .

 with depth=50 i get
 {{{
 $ git clone --depth=50 ffmpeg-full ffmpeg-shallow-50
 Receiving objects: 100% (7150/7150), 14.61 MiB | 8.14 MiB/s, done.
 }}}
 which is still better than 132.69 MiB

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7655>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list