Skip to content
  • Jeff King's avatar
    fast-import: clarify "inline" logic in file_change_m · 3aa99df8
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When we read a fast-import line like:
    
      M 100644 :1 foo.c
    
    we point the local object_entry variable "oe" to the object
    named by the mark ":1". When the input uses the "inline"
    construct, however, we do not have such an object_entry.
    
    The current code is careful not to access "oe" in the inline
    case, but we can make the assumption even more obvious (and
    catch violations of it) by setting oe to NULL and adding a
    comment. As a bonus, this also squelches an over-zealous gcc
    -Wuninitialized warning, which means we can drop the "oe =
    oe" initialization hack.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    3aa99df8