Skip to content
  • Danh Doan's avatar
    t4124: tweak test so that non-compliant diff(1) can also be used · f73533aa
    Danh Doan authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The diff(1) implementation of busybox produces the unified context
    format even without being asked, and it cannot produce the default
    format, but a test in this script relies on.
    
    We could rewrite the test so that we count the lines in the
    postimage out of the unified context format, but the format is not
    supported by some implementations of diff (e.g. HP-UX).
    
    Accomodate busybox by adding a fallback code to count postimage
    lines in unified context output, when counting in the output in the
    default format finds nothing.
    
    Signed-off-by: Danh Doan's avatarĐoàn Trần Công Danh <congdanhqx@gmail.com>
    [jc: applied Documentation/CodingGuidelines and tweaked the log message]
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    f73533aa