Content search in Stash?

Tarun Sapra Community Champion Jan 19, 2014


Currently Stash only supports search based on filenames, but to search based on content there is a plugin available which is pretty expensive, is there a free add-on which is available, if not has anyone else tried to get their way around this issue?


5 answers

1 accepted

0 votes
Accepted answer

HI Tarun,

While I know this isn't going to be helpful for you now, you should definitely vote and watch the following feature request.

It's definitely something we will tackle at some stage (although I couldn't say when).


Tarun Sapra Community Champion Jan 20, 2014

hi Charles,

To be a honest, I am a bit dissapointed with the fact that Stash lacks such a basic and important feature and even in the Ticket url that you have shared it's priority is Minor, it's something which is very important for the succes of Stash.

Hi Tarun,

I wouldn't read too much into the priority. We also think it's very important too and it's on our roadmap, along with quite a few other important features (too much to do and not enough time). We will get there...


1 vote
Timothy Chin Community Champion Jan 19, 2014

If you can't find the add on, it most probably does not exist.

Our company has produced an addon to add this functionality to Stash (Bitbucket).

We tried the plugin but it looks like the bitbucket v5.9.0 is not supported.

Hi @Upasna Bassi,

Bitbucket 5.90 is supported. If you were having issues, feel free to make a support request at

As an administrator, I do not want people using server resources to search the entire repository via plugin. There's enough demand for memory and CPU as it is. My suggestion is to clone the repo and search that all you want.

However, maybe you want something that searches the objects stored in the physical repo and then convert those object hash code (my apologies, I don't remember the git terminology) into actual file names/paths? However, you still can't do anything with the results, except test for existence.

Tarun Sapra Community Champion Feb 04, 2014

" I do not want people using server resources to search the entire repository via plugin"

solution to this is something whic Atlassian isn't interested in implementing as of yet

The code below is quite convenient, it searches across all stashes files containing "plist" and non-case sensitive "basic" in the filename. any change made to a file passing that is concatenated into test.txt then opened.

for sha in $(git rev-list -g stash); do git ls-tree -r $sha:; done | grep plist | grep basic -i | cut -f 1 | cut -d" " -f 3 | sort | uniq | xargs git show > test.txt; open test.txt

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,949 views 7 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you