lib/pvl/commit.sh
changeset 632 711be783d0a1
parent 629 7214fe5c6fac
equal deleted inserted replaced
631:5eebbda7be91 632:711be783d0a1
    66         return 1
    66         return 1
    67     fi
    67     fi
    68 
    68 
    69     # operate?
    69     # operate?
    70     if [ "$COMMIT" = 1 ]; then
    70     if [ "$COMMIT" = 1 ]; then
    71         log_force   "$repo: force commit"
    71         log_force "$repo: force commit"
    72 
    72 
    73         [ "$COMMIT_DIFF" ] && cmd_indent "    " ${commit}_diff "$repo" || true
    73         [ "$COMMIT_DIFF" ] && cmd_indent "    " ${commit}_diff "$repo" || true
    74 
    74 
    75         ${commit}_commit "$repo" "$commit_msg"
    75         ${commit}_commit "$repo" "$commit_msg"
    76 
    76 
    77     elif ! ${commit}_modified "$repo"; then
    77     elif ! ${commit}_modified "$repo"; then
    78         log_warn    "$repo: no changes to commit"
    78         log_skip "$repo: no changes to commit"
    79 
    79 
    80     elif [ "$COMMIT" = 0 ]; then
    80     elif [ "$COMMIT" = 0 ]; then
    81         log_noop    "$repo: skip commit"
    81         log_noop "$repo: skip commit"
    82         
    82         
    83         # still show diff, though
    83         # still show diff, though
    84         [ "$COMMIT_DIFF" ] && cmd_indent "    " ${commit}_diff "$repo" || true
    84         [ "$COMMIT_DIFF" ] && cmd_indent "    " ${commit}_diff "$repo" || true
    85     else
    85     else
    86         log_apply   "$repo: commit: $commit_msg"
    86         log_apply "$repo: commit: $commit_msg"
    87 
    87 
    88         [ "$COMMIT_DIFF" ] && cmd_indent "    " ${commit}_diff "$repo" || true
    88         [ "$COMMIT_DIFF" ] && cmd_indent "    " ${commit}_diff "$repo" || true
    89 
    89 
    90         ${commit}_commit "$repo" "$commit_msg"
    90         ${commit}_commit "$repo" "$commit_msg"
    91     fi
    91     fi