Skip to content

Conversation

@jeremyl-972
Copy link
Contributor

Fix replicationDiff Script Compatibility & Improve Performance
The current script fails on macOS and FreeBSD due to an unsupported diff option:
diff: unrecognized option --new-line-format='`

To fix this, I replaced:
diff --new-line-format="" --unchanged-line-format="" source.log target.log > diff_output.txt

with:
grep -Fxv -f target.log source.log > diff_output.txt

Why grep?

  • ✅ Works across macOS, FreeBSD, and Linux
  • 🚀 Faster and more memory-efficient than diff for line-by-line comparisons
  • 🔧 Simpler and more reliable

Tested on federated and pull replication repos—behavior remains the same. This ensures compatibility while improving performance. 🚀

@jfrog-fadir jfrog-fadir merged commit 30a7fe5 into jfrog:master Jun 3, 2025
1 check passed
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