Re: [PATCH] Update packfile transfer protocol documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Scott Chacon <schacon@xxxxxxxxx> writes:
> > +
> > +A pack-file MUST be sent if either create or update command is used.
> 
> Easier to read if MUST is followed by "_even_ if", like so:
> 
>     ... MUST be sent when a create or update command is used, even if the
>     server already has all the necessary objects.
> 
> Shouldn't we say "the client MUST NOT make reference update request if
> everything is up to date" which would imply that in practice there is no
> reason to send an empty pack data?

Create a new branch to point at an existing object.  Branch creation
causes a pack to be expected, but if you are creating a new branch
that points at an existing object there is nothing to pack.  E.g.:

  git remote add -f A user@host:proj.git
  git push A A/master:refs/heads/new-branch

causes a 0 object pack file to be sent, assuming the remote project's
master branch has not changed in between the two commands.
 
> > +  pack-file         = "PACK" 24*(OCTET)
> 
> Curious---where does this 24 come from?

Hmmph.  Its wrong actually.  I was trying to write the minimum
number of bytes that make up a pack file, which is actually 28.
(12 in the header minus 4 as "PACK" was already spelled out, plus
20 in the footer for the SHA-1).
 
-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]