git-apply fails mysteriously, how do I troubleshoot/fix?

后端 未结 3 1759
南笙
南笙 2020-12-17 07:36

I\'m currently trying to to code-style checking on the PRs of a (github) repository, and I want to deliver patches to the submitters with which they can easily fix the codes

3条回答
  •  -上瘾入骨i
    2020-12-17 08:17

    Try to check against your patch file - example :

    git apply --reject mypatch.patch
    

    this will show you differences if any - here is an example of how it could look like :

    error: patch failed: :
    error: while searching for :
        cout << "}" << endl; // example of a line in your patch
    

提交回复
热议问题