You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2018/01/17 16:19:37 UTC
[7/8] yetus git commit: YETUS-586. smart-apply-patch --committer
misses new directories.
YETUS-586. smart-apply-patch --committer misses new directories.
Signed-off-by: Allen Wittenauer <aw...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/1a8d4a1d
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/1a8d4a1d
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/1a8d4a1d
Branch: refs/heads/YETUS-585
Commit: 1a8d4a1dd58afe6b9020e318b7fcc58552f197d9
Parents: 7da539b
Author: Akira Ajisaka <aa...@apache.org>
Authored: Tue Jan 16 13:43:53 2018 +0900
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed Jan 17 08:00:58 2018 -0800
----------------------------------------------------------------------
precommit/smart-apply-patch.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/1a8d4a1d/precommit/smart-apply-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/smart-apply-patch.sh b/precommit/smart-apply-patch.sh
index e10e7fe..1746129 100755
--- a/precommit/smart-apply-patch.sh
+++ b/precommit/smart-apply-patch.sh
@@ -260,9 +260,10 @@ function gitapply_and_commit
author="${name} <${email}>"
summary=$(${GREP} -E "^\*summary\*:" "${jsontmpfile}" | cut -f4 -d"*")
gitapply_apply "${patchfile}"
+ ${GIT} add --all
echo "Committing with author: ${author}, summary: ${summary}"
yetus_run_and_redirect "${PATCH_DIR}/apply-patch-git-am-fallback.log" \
- "${GIT}" commit ${EXTRA_ARGS} --signoff -a -m "${PATCH_OR_ISSUE}. ${summary}" \
+ "${GIT}" commit ${EXTRA_ARGS} --signoff -m "${PATCH_OR_ISSUE}. ${summary}" \
--author="${author}"
}
@@ -301,6 +302,12 @@ plugins_initialize
locate_patch
if [[ ${COMMITMODE} = true ]]; then
+ status=$(${GIT} status --porcelain)
+ if [[ "$status" != "" ]] ; then
+ yetus_error "ERROR: Can't use --committer option in a workspace that contains the following modifications:"
+ yetus_error "${status}"
+ cleanup_and_exit 1
+ fi
PATCH_METHODS=("gitam" "${PATCH_METHODS[@]}")
fi