There may already be a request for this, but if not you can add one to the issue tracker.
Merge has the ability to execute arbitrary git
commands, so there is some recourse for something like this. Unfortunately, git diff
has no flag for checking only unstaged files without more gymnastics involved.
You can however do tricks with aliases. For example, with an alias like this:
[alias]
searchunstaged = "!f() { grep --with-filename "$1" $(git ls-files -m --others --exclude-standard); }; f"
You could do something like:
(master *=) tmartin:dart:~/test_repo> git searchunstaged stuff
yarn.lock:I did some stuff
With that out of the way, you can get Merge to execute this command and ask you for the text to include by creating a file named Default.sublime-commands
in your Merge User
package with the following content (or just add the command if you already have such a file):
[
{
"caption": "Search unstaged files...",
"command": "git",
"args": {"argv": ["searchunstaged", "$text"] }
}
]
Then you can select the command and enter the text:
And when you run the command, you can click the terminal icon (in the image above, it’s visible at the top-right with the green check) to see what the command did: