Skip to content

fix: sync.pl leaves clean working tree (protected files, excludes, no .orig)#396

Merged
fglock merged 3 commits into
masterfrom
fix/jperldoc-protected-files
Mar 28, 2026
Merged

fix: sync.pl leaves clean working tree (protected files, excludes, no .orig)#396
fglock merged 3 commits into
masterfrom
fix/jperldoc-protected-files

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Mar 28, 2026

Summary

This PR fixes the dev/import-perl5/sync.pl script to leave a clean working tree after running.

Changes

  1. Protected files - Mark patched files as protected: true so they won't be overwritten:

    • Pod/Perldoc.pm - case-insensitive Pod/ directory search for JAR paths
    • Test/Harness.pm - filters jar: paths from @inc
    • TAP/Parser/Iterator/Process.pm - handles missing fork
  2. Exclude patterns - Add exclude option support to sync.pl for directory imports:

    • Exclude build artifacts from perl5/pod: .gitignore, Makefile, buildtoc, etc.
    • Exclude broken symlinks: perllinux.pod, perlmacosx.pod, etc. (pointing to non-existent ../README.* files)
  3. No backup files - Use --no-backup-if-mismatch in patch command to prevent creating .orig files

Test plan

  • make passes
  • perl dev/import-perl5/sync.pl completes successfully
  • git status shows clean working tree after sync
  • ./jperldoc perlfunc works
  • Protected files preserved after sync

Generated with Devin

fglock and others added 2 commits March 28, 2026 10:42
Mark the following files as protected in config.yaml so they will not be
overwritten when running dev/import-perl5/sync.pl:

- Pod/Perldoc.pm - has case-insensitive Pod/ directory search for JAR paths
- Test/Harness.pm - filters out jar: paths from @inc for child processes
- TAP/Parser/Iterator/Process.pm - handles missing fork in get_select_handles

This prevents loss of PerlOnJava-specific patches when syncing from perl5.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Add exclude option support to sync.pl for directory imports
- Exclude build artifacts from perl5/pod: Makefile, buildtoc, etc.
- Exclude broken symlinks: perllinux.pod, perlmacosx.pod, etc.
  (these point to ../README.* which do not exist in target)

This prevents untracked files from being created after running sync.pl.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@fglock fglock force-pushed the fix/jperldoc-protected-files branch from 6b6a8bf to 1c38fbc Compare March 28, 2026 09:57
Add --no-backup-if-mismatch to patch command to prevent creating
Unix.pm.orig and similar backup files during sync.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@fglock fglock changed the title fix: protect patched files from sync.pl overwrites fix: sync.pl leaves clean working tree (protected files, excludes, no .orig) Mar 28, 2026
@fglock fglock merged commit 42f963e into master Mar 28, 2026
2 checks passed
@fglock fglock deleted the fix/jperldoc-protected-files branch March 28, 2026 10:05
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.

1 participant