stash-codesearch-plugin icon indicating copy to clipboard operation
stash-codesearch-plugin copied to clipboard

search and replace across git repos

Open ashok3t opened this issue 7 years ago • 2 comments

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'

ashok3t avatar Dec 10 '18 15:12 ashok3t

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.

terabyte avatar Dec 10 '18 16:12 terabyte

All good points, thanks for the feedback.

ashok3t avatar Dec 10 '18 16:12 ashok3t