hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Wittenauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11994) smart-apply-patch wrongly assumes that git is infallible
Date Fri, 22 May 2015 00:15:17 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14555329#comment-14555329
] 

Allen Wittenauer commented on HADOOP-11994:
-------------------------------------------


It definitely tries git apply first in trunk:

{code}
# Special case for git-diff patches without --no-prefix
if is_git_diff_with_prefix "$PATCH_FILE"; then
  GIT_FLAGS="--binary -p1 -v"
  if [[ -z $DRY_RUN ]]; then
      GIT_FLAGS="$GIT_FLAGS --stat --apply "
      echo Going to apply git patch with: git apply "${GIT_FLAGS}"
  else
      GIT_FLAGS="$GIT_FLAGS --check "
  fi
  git apply ${GIT_FLAGS} "${PATCH_FILE}"
  exit $?
fi

# Come up with a list of changed files into $TMP
TMP="$TMPDIR/smart-apply.paths.$RANDOM"
TOCLEAN="$TOCLEAN $TMP"

if $PATCH -p0 -E --dry-run < $PATCH_FILE 2>&1 > $TMP; then
{code}

> smart-apply-patch wrongly assumes that git is infallible
> --------------------------------------------------------
>
>                 Key: HADOOP-11994
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11994
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Allen Wittenauer
>
> Even if git fails, smart-apply-patch should try the normal patch command.  I've seen
a few patches now where git apply fails, but patch does not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message