Suggest git diff --no-index when relevant

This makes it easier to use `git diff` on untracked files.
This commit is contained in:
Joseph Frazier
2016-10-02 23:07:50 -04:00
parent db7dffdb44
commit 2b88ea11ea
3 changed files with 44 additions and 0 deletions
+1
View File
@@ -169,6 +169,7 @@ using the matched rule and runs it. Rules enabled by default are as follows:
* `git_branch_exists` – offers `git branch -d foo`, `git branch -D foo` or `git checkout foo` when creating a branch that already exists;
* `git_branch_list` – catches `git branch list` in place of `git branch` and removes created branch;
* `git_checkout` – fixes branch name or creates new branch;
* `git_diff_no_index` – adds `--no-index` to previous `git diff` on untracked files;
* `git_diff_staged` – adds `--staged` to previous `git diff` with unexpected output;
* `git_fix_stash` – fixes `git stash` commands (misspelled subcommand and missing `save`);
* `git_help_aliased` &ndash; fixes `git help <alias>` commands replacing <alias> with the aliased command;