Skip to content
  • Johannes Sixt's avatar
    t9903: fix broken && chain · c00bfc9d
    Johannes Sixt authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    We might wonder why our && chain check does not catch this case:
    The && chain check uses a strange exit code with the expectation that
    the second or later part of a broken && chain would not exit with this
    particular code.
    
    This expectation does not work in this case because __git_ps1, being
    the first command in the second part of the broken && chain, records
    the current exit code, does its work, and finally returns to the caller
    with the recorded exit code. This fools our && chain check.
    
    Signed-off-by: default avatarJohannes Sixt <j6t@kdbg.org>
    Reviewed-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c00bfc9d