palantir / stash-codesearch-plugin

Provides global repository, commit, and file content search for Atlassian Stash instances
Apache License 2.0
62 stars 20 forks source link

search and replace across git repos #20

Open ashok3t opened 5 years ago

ashok3t commented 5 years ago

As a user of stash plugins, I would like the ability to replace text across multiple repositories, so that I can keep my code base up to date.

Consider, for instance, this behavior across multiple repositories: git grep -l 'original_text' | xargs sed -i 's/original_text/new_text/g'

terabyte commented 5 years ago

This is not a great fit for the plugin, IMHO. It is challenging to surface a GUI which appropriately lets you review and commit this change. I would be strongly against actually rewriting history (too much power to wield!) and even creating commits with the changes would be a massive undertaking (how do you specify which branches? what author creates the commit? do you create PRs? What about branch permissions and visibility issues?)

A plugin which implemented this feature would probably have 10x more code than the current plugin. It should probably be done as its own plugin if you really want to achieve this.

ashok3t commented 5 years ago

All good points, thanks for the feedback.