This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: git conversion in progress


On 14/01/2020 11:01, Georg-Johann Lay wrote:
> Am 11.01.20 um 02:18 schrieb Joseph Myers:
>> I encourage people to continue to work on improving the documentation for
>> using git with GCC
>> (<https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00623.html> and
>> <https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00625.html> list some of
>> the things that it seems it might be useful to document).
> 
> Nitpick:
> 
> https://gcc.gnu.org/git.html#tags "Branches and Tags"
> 
> writes:
> 
> A branch called branchname can be checked out with the following command:
> 
>     git clone -b branchname ...
> 
> Referring to this as "checking out" is confusing IMO, because it may be
> confused with
>     git checkout -b branchname
> 
> Whereas the latter is a checkout of some branch (or changing the branch)
> within the same local copy, the former is *cloning* into an individual,
> fresh local copy which has only the mentioned branch.
> 
> Dito for tags.
> 
> Cloning with only 1 branch is usually done because it faster downloads
> and consumes less local memory.  When one works with more than one
> branch (usually when backporting stuff etc.), the mentioned

Well it's likely that the server would have to repack the objects on the
fly to supply just one branch; and it does that less well than the base
pack).  So you'd probably end up with a much larger initial download
than just fetching the entire history (currently ~750M).  It would
likely take longer to fetch as well since the server has to do much more
work to generate that custom pack.

Yes, if you want to work with that single branch long-term you can
repack it again locally (if you have enough ram to produce a really
dense pack).

So frankly, I wouldn't recommend downloading just a single branch.

> 
> git clone --reference original-gcc ...
> 
> might be preferable.
> 
> Johann


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]