All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Scott Chacon <schacon@gmail.com>, git list <git@vger.kernel.org>
Subject: Re: [PATCH] Update packfile transfer protocol documentation
Date: Mon, 2 Nov 2009 15:57:07 -0800	[thread overview]
Message-ID: <20091102235707.GV10505@spearce.org> (raw)
In-Reply-To: <7vzl74trmc.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> Scott Chacon <schacon@gmail.com> 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.

  reply	other threads:[~2009-11-02 23:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-01 23:18 [PATCH] Update packfile transfer protocol documentation Scott Chacon
2009-11-02  5:17 ` Junio C Hamano
2009-11-02 15:41   ` Shawn O. Pearce
2009-11-02 17:31     ` Junio C Hamano
2009-11-02 15:43 ` Shawn O. Pearce
2009-11-02 23:48 ` Junio C Hamano
2009-11-02 23:57   ` Shawn O. Pearce [this message]
2009-11-03  0:36     ` Junio C Hamano
2009-11-03  0:58       ` Shawn O. Pearce
2009-11-03 22:05         ` Scott Chacon
2009-11-04  0:40           ` Junio C Hamano
2009-11-04  0:40 ` Junio C Hamano
2009-11-04  0:56   ` Shawn O. Pearce
2009-11-04  1:07     ` Junio C Hamano
2009-11-04  1:18       ` Shawn O. Pearce
2009-11-04  1:48         ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2009-11-04  5:58 Scott Chacon
2009-11-04  6:36 ` Sverre Rabbelier
2009-11-05  5:24 ` Junio C Hamano
2009-10-29 17:35 Scott Chacon
2009-10-30 22:07 ` Junio C Hamano
2009-10-31  2:06 ` Shawn O. Pearce
2009-10-31 20:12   ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091102235707.GV10505@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=schacon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.