Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 10, 2007
  1. @spearce

    Don't die in git-http-fetch when fetching packs.

    spearce authored Junio C Hamano committed
    My sp/mmap changes to pack-check.c modified the function such that
    it expects packed_git.pack_size to be populated with the total
    bytecount of the packfile by the caller.
    
    But that isn't the case for packs obtained by git-http-fetch as
    pack_size was not initialized before being accessed.  This caused
    verify_pack to think it had 2^32-21 bytes available when the
    downloaded pack perhaps was only 305 bytes in length.  The use_pack
    function then later dies with "offset beyond end of packfile"
    when computing the overall file checksum.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Sep 2, 2006
  1. @spearce

    Replace uses of strdup with xstrdup.

    spearce authored Junio C Hamano committed
    Like xmalloc and xrealloc xstrdup dies with a useful message if
    the native strdup() implementation returns NULL rather than a
    valid pointer.
    
    I just tried to use xstrdup in new code and found it to be missing.
    However I expected it to be present as xmalloc and xrealloc are
    already commonly used throughout the code.
    
    [jc: removed the part that deals with last_XXX, which I am
     finding more and more dubious these days.]
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Aug 23, 2006
  1. @spearce

    Convert memcpy(a,b,20) to hashcpy(a,b).

    spearce authored Junio C Hamano committed
    This abstracts away the size of the hash values when copying them
    from memory location to memory location, much as the introduction
    of hashcmp abstracted away hash value comparsion.
    
    A few call sites were using char* rather than unsigned char* so
    I added the cast rather than open hashcpy to be void*.  This is a
    reasonable tradeoff as most call sites already use unsigned char*
    and the existing hashcmp is also declared to be unsigned char*.
    
    [jc: Splitted the patch to "master" part, to be followed by a
     patch for merge-recursive.c which is not in "master" yet.
    
     Fixed the cast in the latter hunk to combine-diff.c which was
     wrong in the original.
    
     Also converted ones left-over in combine-diff.c, diff-lib.c and
     upload-pack.c ]
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on May 19, 2006
  1. @spearce

    Log ref updates made by fetch.

    spearce authored Junio C Hamano committed
    If a ref is changed by http-fetch, local-fetch or ssh-fetch
    record the change and the remote URL/name in the log for the ref.
    This requires loading the config file to check logAllRefUpdates.
    
    Also fixed a bug in the ref lock generation; the log file name was
    not being produced right due to a bad prefix length.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.