git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eneas Queiroz <cotequeiroz@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] Error while trying to git apply a patch; works with patch -p1
Date: Thu, 4 Oct 2018 18:01:11 -0300	[thread overview]
Message-ID: <CAPxccB1VnDV5BjkcFcoPVmegJSg6iN_tD3o0e9G2XKXaM_=4KA@mail.gmail.com> (raw)

I've sent this to the list 2 days ago, but I can't find it in the list
archives, so I'm sending it again without files attached.  I apologize
if this is a duplicate. One should be able to reproduce this with the
current PR files, but if not, I can provide them.

I've hit a strange error while trying to apply a patch from github
here: https://github.com/openwrt/openwrt/pull/965

965.patch:452: trailing whitespace.

965.patch:559: space before tab in indent.
             -o $(SHLIBNAME_FULL) \
965.patch:560: space before tab in indent.
             $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS; \
965.patch:564: space before tab in indent.
        -o $(SHLIBNAME_FULL) \
965.patch:2334: trailing whitespace.

error: package/libs/openssl/patches/100-Configure-afalg-support.patch:
No such file or directory
error: package/libs/openssl/patches/110-openwrt_targets.patch: No such
file or directory
error: package/libs/openssl/patches/120-fix_link_segfault.patch: No
such file or directory
error: package/libs/openssl/patches/1.1.0/100-Configure-afalg-support.patch:
No such file or directory
error: package/libs/openssl/patches/1.1.0/110-openwrt_targets.patch:
No such file or directory

If you get the patch file from
https://github.com/openwrt/openwrt/pull/965.patch and apply it with
git apply, it fails.  If I apply the same file with patch -p1, it
works fine.  I've tried it with git 2.16.4 and 2.19, and they both
fail with the same error, and at least 2 more people have confirmed
it.

git apply fails even when using git format-patch -13 --stdout as a
source, so it is not github doing something weird.

The file is a series of 13 patches.  If I split the series after the
3rd patch, it works.
Also, if I use https://github.com/openwrt/openwrt/pull/965.diff, it also works.

I'm not subscribed to the list, so please CC me.

Cheers,

Eneas

             reply	other threads:[~2018-10-04 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 21:01 Eneas Queiroz [this message]
2018-10-04 21:45 ` [BUG] Error while trying to git apply a patch; works with patch -p1 SZEDER Gábor
2018-10-05 12:17   ` Eneas Queiroz
2018-10-05 13:16     ` SZEDER Gábor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPxccB1VnDV5BjkcFcoPVmegJSg6iN_tD3o0e9G2XKXaM_=4KA@mail.gmail.com' \
    --to=cotequeiroz@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).