1. 03 11月, 2005 1 次提交
    • J
      Be careful when dereferencing tags. · 9534f40b
      Junio C Hamano 提交于
      One caller of deref_tag() was not careful enough to make sure
      what deref_tag() returned was not NULL (i.e. we found a tag
      object that points at an object we do not have).  Fix it, and
      warn about refs that point at such an incomplete tag where
      needed.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9534f40b
  2. 29 10月, 2005 3 次提交
  3. 27 10月, 2005 1 次提交
  4. 26 10月, 2005 2 次提交
    • J
      upload-pack: tighten request validation. · 565ebbf7
      Junio C Hamano 提交于
      This makes sure what the other end asks for are among what we
      offered to give them.  Otherwise we would end up running
      git-rev-list with 20-byte nonsense, only to find it either die
      (because the object was not found) or waste time (because we
      ended up serving that phony 'client').
      
      Also avoid wasting needs_sha1 pool to record duplicates, and
      detect cloning requests better.
      
      [this used to be on top of Johannes fetch-pack enhancements,
       which we are rewinding it for further testing for now, so
       the commit is rebased.]
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      565ebbf7
    • J
      Revert recent fetch-pack/upload-pack updates. · af2d3aa4
      Junio C Hamano 提交于
      Let's have it simmer a bit longer in the proposed updates branch
      and shake the problems out.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      af2d3aa4
  5. 25 10月, 2005 3 次提交
    • J
      upload-pack: fix thinko in common-commit finder code. · 7efc8e43
      Junio C Hamano 提交于
      The code to check if we have the object the other side has was bogus
      (my fault).
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      7efc8e43
    • J
      git-upload-pack: Support sending multiple ACK messages · 0f8fdc39
      Johannes Schindelin 提交于
      The current fetch/upload protocol works like this:
      
      - client sends revs it wants to have via "want" messages
      - client sends a flush message (message with len 0)
      - client sends revs it has via "have" messages
      - after one window (32 revs), a flush is sent
      - after each subsequent window, a flush is sent, and an ACK/NAK is received.
              (NAK means that server does not have any of the transmitted revs;
               ACK sends also the sha1 of the rev server has)
       - when the first ACK is received, client sends "done", and does not expect
              any further messages
      
      One special case, though:
      
      - if no ACK is received (only NAK's), and client runs out of revs to send,
              "done" is sent, and server sends just one more "NAK"
      
      A smarter scheme, which actually has a chance to detect more than one
      common rev, would be to send more than just one ACK. This patch implements
      the server side of the following extension to the protocol:
      
      - client sends at least one "want" message with "multi_ack" appended, like
      
              "want 1234567890123456789012345678901234567890 multi_ack"
      
      - if the server understands that extension, it will send ACK messages for all
              revs it has, not just the first one
      
      - server appends "continue" to the ACK messages like
      
              "ACK 1234567890123456789012345678901234567890 continue"
      
              until it has MAX_HAS-1 revs. In this manner, client knows when to
              stop sending revs by checking for the substring "continue" (and
              further knows that server understands multi_ack)
      
      In this manner, the protocol stays backwards compatible, since both client
      must send "want ... multi_ack" and server must answer with "ACK ...
      continue" to enable the extension.
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0f8fdc39
    • J
      git-upload-pack: More efficient usage of the has_sha1 array · 794f9fe7
      Johannes Schindelin 提交于
      This patch is based on Junio's proposal. It marks parents of common revs
      so that they do not clutter up the has_sha1 array.
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      794f9fe7
  6. 22 10月, 2005 1 次提交
  7. 20 10月, 2005 1 次提交
    • H
      git-daemon: timeout, eliminate double DWIM · 960deccb
      H. Peter Anvin 提交于
      It turns out that not only did git-daemon do DWIM, but git-upload-pack
      does as well.  This is bad; security checks have to be performed *after*
      canonicalization, not before.
      
      Additionally, the current git-daemon can be trivially DoSed by spewing
      SYNs at the target port.
      
      This patch adds a --strict option to git-upload-pack to disable all
      DWIM, a --timeout option to git-daemon and git-upload-pack, and an
      --init-timeout option to git-daemon (which is typically set to a much
      lower value, since the initial request should come immediately from the
      client.)
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      960deccb
  8. 16 10月, 2005 1 次提交
    • J
      Show peeled onion from upload-pack and server-info. · f6b42a81
      Junio C Hamano 提交于
      This updates git-ls-remote to show SHA1 names of objects that are
      referred by tags, in the "ref^{}" notation.
      
      This would make git-findtags (without -t flag) almost trivial.
      
          git-peek-remote . |
          sed -ne "s:^$target	"'refs/tags/\(.*\)^{}$:\1:p'
      
      Also Pasky could do:
      
          git-ls-remote --tags $remote |
          sed -ne 's:\(	refs/tags/.*\)^{}$:\1:p'
      
      to find out what object each of the remote tags refers to, and
      if he has one locally, run "git-fetch $remote tag $tagname" to
      automatically catch up with the upstream tags.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f6b42a81
  9. 06 10月, 2005 1 次提交
    • J
      upload-pack: Do not choke on too many heads request. · e091eb93
      Junio C Hamano 提交于
      Cloning from a repository with more than 256 refs (heads and tags
      included) will choke, because upload-pack has a built-in limit of
      feeding not more than MAX_NEEDS (currently 256) heads to underlying
      git-rev-list.  This is a problem when cloning a repository with many
      tags, like http://www.linux-mips.org/pub/scm/linux.git, which has 290+
      tags.
      
      This commit introduces a new flag, --all, to git-rev-list, to include
      all refs in the repository.  Updated upload-pack detects requests that
      ask more than MAX_NEEDS refs, and sends everything back instead.
      
      We may probably want to tweak the definitions of MAX_NEEDS and
      MAX_HAS, but that is a separate topic.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e091eb93
  10. 24 8月, 2005 1 次提交
  11. 09 7月, 2005 1 次提交
  12. 06 7月, 2005 2 次提交
  13. 05 7月, 2005 3 次提交