Consider to skip missing target files
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
Research direction
Reproduce the behavior with grunt patch:43986 and compare it with svn patch 43986v5.2.diff, using the missing src/wp-admin/css/list-tables-rtl.css target and the other listed files as the example. Trace the grunt patch task from that entry point and check how missing targets are handled. Done means missing targets are skipped without prompting while applicable files are still patched.
Written by the indexing model from the issue text.
Description
Definitely not my area of expertise, but I've just noticed something and thought to report it. Seems that when a patch targets a missing file (maybe because it was moved or for any other reason), grunt-patch just stops and asks for the path to the missing file. Instead, svn patch just patches straight away and skips the missing target.
Wouldn't be better to match the native svn patch behavior?
Here's the output of the two commands while I've run with a patch targeting a missing file:
$ grunt patch:43986
Running "patch:43986" (patch) task
? Please select a patch to apply 43986v5.2.diff (9.7 KB) - added by afragen 11 hours ago.
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git src/wp-admin/css/list-tables-rtl.css src/wp-admin/css/list-tables-rtl.css
|index 468dcbf8a1..dd7f90d607 100644
|--- src/wp-admin/css/list-tables-rtl.css
|+++ src/wp-admin/css/list-tables-rtl.css
--------------------------
File to patch:
$ svn patch 43986v5.2.diff
Skipped missing target: 'src/wp-admin/css/list-tables-rtl.css'
U src/wp-admin/css/list-tables.css
U src/wp-admin/includes/class-wp-plugin-install-list-table.php
U src/wp-admin/includes/plugin-install.php
Summary of conflicts:
Skipped paths: 1
- Dominant language
- JavaScript
- Stars
- 51
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WordPress/grunt-patch-wordpress
-
grunt patch fails for every ticket: Trac returns a bot challenge instead of the attachment list Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
WordPress/grunt-patch-wordpress#95 · 1 comment · 1 reaction ·
-
Expand NPM users Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
All issues in WordPress/grunt-patch-wordpress
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100