()
return (local_commit, remote_commit)
Collect pre-commit variables from stdin.
Collect pre-commit variables from stdin.
Collect pre - commit variables from stdin .
def collect_from_stdin() -> Tuple[str, str]:
    """
    Collect pre-commit variables from stdin.
    """
    prepush_input = sys.stdin.read().split()
    if len(prepush_input) < 4:
        # Then it's either a tag or a deletion event
        local_commit = EMPTY_SHA
        remote_commit = EMPTY_SHA
    else:
        local_commit = prepush_input[1].strip()
        remote_commit = prepush_input[3].strip()

    return (local_commit, remote_commit)
def collect_from_stdin ( ) -> Tuple [ str , str ] : prepush_input = sys . stdin . read ( ) . split ( ) if len ( prepush_input ) < 4 : # Then it's either a tag or a deletion event local_commit = EMPTY_SHA remote_commit = EMPTY_SHA else : local_commit = prepush_input [ 1 ] . strip ( ) remote_commit = prepush_input [ 3 ] . strip ( ) return ( local_commit , remote_commit )