Skip to content

Fix the stdin diff examples of the documentation - #1236

Merged
veewee merged 1 commit into
phpro:v2.xfrom
lyrixx:doc-stdin-raw-patch
Oct 16, 2026
Merged

veewee merged 1 commit into
phpro:v2.xfrom
lyrixx:doc-stdin-raw-patch

Conversation

@lyrixx

@lyrixx lyrixx commented Oct 15, 2026

Copy link
Copy Markdown
Contributor
Q A
Branch v2.x
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Documented? yes
Fixed tickets

81a6f9a replaced git diff with git diff --raw in the stdin examples, as gitlib needs the raw
information to parse a diff. But --raw alone prints the raw lines only, without the patch: the
input has no diff --git, so StdInFiles reads it as a list of files, each raw line being a path:

$ git diff --staged --raw | php vendor/bin/grumphp run
- :100644 100644 7898192 9ad2ebb M	a.txt exceeded the maximum size of 1.

With --patch too, like the hooks already do (diff --raw -r -p ...), GrumPHP gets the files:

$ git diff --staged --raw --patch | php vendor/bin/grumphp run
- a.txt exceeded the maximum size of 1.

@veewee
veewee merged commit b9275ee into phpro:v2.x Oct 16, 2026
1 check passed
@veewee

veewee commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@lyrixx
lyrixx deleted the doc-stdin-raw-patch branch October 16, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants