Repository: yetus Updated Branches: refs/heads/master ce10af004 -> 8fbdc79c0
YETUS-338. test-patch may not update patchfile in patchdir Signed-off-by: Kengo Seki <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/8fbdc79c Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/8fbdc79c Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/8fbdc79c Branch: refs/heads/master Commit: 8fbdc79c0778f91d83480f47fa7dc01f569adb15 Parents: ce10af0 Author: Allen Wittenauer <[email protected]> Authored: Sun Mar 20 10:49:53 2016 -0700 Committer: Kengo Seki <[email protected]> Committed: Mon Mar 21 23:34:57 2016 +0900 ---------------------------------------------------------------------- precommit/core.d/patchfiles.sh | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/8fbdc79c/precommit/core.d/patchfiles.sh ---------------------------------------------------------------------- diff --git a/precommit/core.d/patchfiles.sh b/precommit/core.d/patchfiles.sh index c97ecf3..2f54d67 100755 --- a/precommit/core.d/patchfiles.sh +++ b/precommit/core.d/patchfiles.sh @@ -98,6 +98,12 @@ function locate_patch if [[ -f ${PATCH_OR_ISSUE} ]]; then patchfile="${PATCH_OR_ISSUE}" PATCH_SYSTEM=generic + if [[ -f "${PATCH_DIR}/patch" ]]; then + "${DIFF}" -q "${PATCH_OR_ISSUE}" "${PATCH_DIR}/patch" >/dev/null + if [[ $? -eq 1 ]]; then + rm "${PATCH_DIR}/patch" + fi + fi else # run through the bug systems. maybe they know? for bugsys in ${BUGSYSTEMS}; do
