Skip to content
  • Jonathan Tan's avatar
    sub-process: refactor handshake to common function · fa64a2fd
    Jonathan Tan authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Refactor, into a common function, the version and capability negotiation
    done when invoking a long-running process as a clean or smudge filter.
    This will be useful for other Git code that needs to interact similarly
    with a long-running process.
    
    As you can see in the change to t0021, this commit changes the error
    message reported when the long-running process does not introduce itself
    with the expected "server"-terminated line. Originally, the error
    message reports that the filter "does not support filter protocol
    version 2", differentiating between the old single-file filter protocol
    and the new multi-file filter protocol - I have updated it to something
    more generic and useful.
    
    Signed-off-by: default avatarJonathan Tan <jonathantanmy@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    fa64a2fd