You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@yetus.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2018/07/25 16:56:00 UTC

[jira] [Comment Edited] (YETUS-645) Make leading path component optional in patch files (support IntelliJ patch files)

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

Allen Wittenauer edited comment on YETUS-645 at 7/25/18 4:55 PM:
-----------------------------------------------------------------

Hmm. Weird.  Yetus actually tries to do -p0 which should support patches without a leading path.  Any chance you could share or link to a patch that breaks? Thanks!

(p.s., from the link,it looks like there is more going on than just the leading a/b so want to take a look at one that Yetus failed to used.)


was (Author: aw):
Hmm. Weird.  Yetus actually tries to do -p0 which should support patches without a leading path.  Any chance you could share or link to a patch that breaks? Thanks!

> Make leading path component optional in patch files (support IntelliJ patch files)
> ----------------------------------------------------------------------------------
>
>                 Key: YETUS-645
>                 URL: https://issues.apache.org/jira/browse/YETUS-645
>             Project: Yetus
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Priority: Major
>
> IntelliJ IDEA has a "create patch" feature that generates patch files in a format that isn't supported by some tools like Yetus.  In particular, there is no leading "a/" and "b/" in the paths.  That appears to be the sole difference requiring these patches to be supported.
>  
> See [https://youtrack.jetbrains.com/issue/IDEA-92793]
>  
> To work around this, I wrote a one-liner Bash script using SED to insert the "a/" and b/" at the right spots:
> {code:java}
> sed -i '' -e 's/^--- /--- a\//g' -e 's/^+++ /+++ b\//g' "$1"
> {code}
> In this issue I propose that Yetus detect the absence of a/ and b/ and either (a) insert them using a similar script, or (b) toggling the "-p" option when the patch is applied using [git-apply|https://git-scm.com/docs/git-apply] or other tool.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)