composer-patches: Breaks with Git 2.14.0

Using Git 2.14.0 breaks appying Patches (Alpine Edge, Composer 1.5). Latest Working Version is 2.13.4.

Applying patches for drupal/core
    https://www.drupal.org/files/issues/2551373-35.patch (...)
cd 'web/core' && git --git-dir=. apply --check '-p1' '/tmp/5989b7ae422cc.patch'
warning: unable to access 'config': Is a directory
warning: unable to access 'config': Is a directory
fatal: unknown error occurred while reading the configuration files

cd 'web/core' && git --git-dir=. apply --check '-p0' '/tmp/5989b7ae422cc.patch'
warning: unable to access 'config': Is a directory

warning: unable to access 'config': Is a directory
fatal: unknown error occurred while reading the configuration files

cd 'web/core' && git --git-dir=. apply --check '-p2' '/tmp/5989b7ae422cc.patch'
warning: unable to access 'config': Is a directory
warning: unable to access 'config': Is a directory
fatal: unknown error occurred while reading the configuration files

patch '-p1' --no-backup-if-mismatch -d 'web/core' < '/tmp/5989b7ae422cc.patch'
patch: unrecognized option: no-backup-if-mismatch

BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

Usage: patch [OPTIONS] [ORIGFILE [PATCHFILE]]

	-p,--strip N		Strip N leading components from file names
	-i,--input DIFF		Read DIFF instead of stdin
	-R,--reverse		Reverse patch
	-N,--forward		Ignore already applied patches
	-E,--remove-empty-files	Remove output files if they become empty

patch '-p0' --no-backup-if-mismatch -d 'web/core' < '/tmp/5989b7ae422cc.patch'
patch: unrecognized option: no-backup-if-mismatch

BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

Usage: patch [OPTIONS] [ORIGFILE [PATCHFILE]]

	-p,--strip N		Strip N leading components from file names
	-i,--input DIFF		Read DIFF instead of stdin
	-R,--reverse		Reverse patch
	-N,--forward		Ignore already applied patches
	-E,--remove-empty-files	Remove output files if they become empty

patch '-p2' --no-backup-if-mismatch -d 'web/core' < '/tmp/5989b7ae422cc.patch'
patch: unrecognized option: no-backup-if-mismatch

BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

Usage: patch [OPTIONS] [ORIGFILE [PATCHFILE]]

	-p,--strip N		Strip N leading components from file names
	-i,--input DIFF		Read DIFF instead of stdin
	-R,--reverse		Reverse patch
	-N,--forward		Ignore already applied patches
	-E,--remove-empty-files	Remove output files if they become empty

   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2551373-35.patch

In the Release Notes (https://github.com/git/git/blob/master/Documentation/RelNotes/2.14.0.txt) are changes to “gitdir” and “git apply”, maybe its one of them?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (2 by maintainers)

Commits related to this issue

Most upvoted comments

The 1.6.4 release seems to have fixed it.

See my new PR for this here, including an in-depth explanation of why patches were still applying in spite of the errors: https://github.com/cweagans/composer-patches/pull/165

Also note that this PR reveals another bug, which is that git apply probably can’t be used to apply patches in this context.