Skip to content
  • Jeff King's avatar
    blob: drop unused parts of parse_blob_buffer() · c1166ca0
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    Our parse_blob_buffer() takes a ptr/len combo, just like
    parse_tree_buffer(), etc, and returns success or failure. But it doesn't
    actually do anything with them; we just set the "parsed" flag in the
    object and return success, without even looking at the contents.
    
    There could be some value to keeping these unused parameters:
    
      - it's consistent with the parse functions for other object types. But
        we already lost that consistency in 837d395a (Replace parse_blob()
        with an explanatory comment, 2010-01-18).
    
      - As the comment from 837d395a explains, callers are supposed to
        make sure they have the object content available. So in theory
        asking for these parameters could serve as a signal. But there are
        only two callers, and one of them always passes NULL (after doing a
        streaming check of the object hash).
    
        This shows that there aren't likely to be a lot of callers (since
        everyone either uses the type-generic parse functions, or...
    c1166ca0