• J
    status: add --long output format option · f3f47a1e
    Jeff King 提交于
    You can currently set the output format to --short or
    --porcelain. There is no --long, because we default to it
    already. However, you may want to override an alias that
    uses "--short" to get back to the default.
    
    This requires a little bit of refactoring, because currently
    we use STATUS_FORMAT_LONG internally to mean the same as
    "the user did not specify anything". By expanding the enum
    to include STATUS_FORMAT_NONE, we can distinguish between
    the implicit and explicit cases. This effects these
    conditions:
    
      1. The user has asked for NUL termination. With NONE, we
         currently default to turning on the porcelain mode.
         With an explicit --long, we would in theory use NUL
         termination with the long mode, but it does not support
         it. So we can just complain and die.
    
      2. When an output format is given to "git commit", we
         default to "--dry-run". This behavior would now kick in
         when "--long" is given, too.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    f3f47a1e
commit.c 45.9 KB