Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 647994

Summary: git-r3.eclass - EGIT protocol error with "shallow"/`--depth=1`
Product: Gentoo Linux Reporter: Cedric Sodhi <manday>
Component: EclassesAssignee: Michał Górny <mgorny>
Status: RESOLVED INVALID    
Severity: normal CC: manday
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 648690    

Description Cedric Sodhi 2018-02-18 09:31:39 UTC
With EGIT_CLONE_TYPE="shallow" the following happens when trying to emerge ffmpeg-9999 (clone or fetch)

> git clone https://git.ffmpeg.org/ffmpeg.git +HEAD:refs/git-r3/HEAD --depth=1
> Cloning into '+HEAD:refs/git-r3/HEAD'...
> fatal: The remote end hung up unexpectedly
> fatal: protocol error: bad pack header

I suppose the problem is the `--depth=1` being appended at the end rather than specified directly after `clone`.
Comment 1 Cedric Sodhi 2018-02-18 09:32:41 UTC
(`fetch`, that is. In the above example I just reproduced the error manually.)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-18 11:30:21 UTC
That's a problem with the server. You can workaround it by setting EGIT_MIN_CLONE_TYPE.