[PATCH 0/3] Implicitly use --no-index if git grep is used outside of repo
- From
Thomas Gummerer <t.gummerer@gmail.com>
- Date
- Jan 10, 2016, 14:19 UTC
- Message-ID
- <1452435597-12099-1-git-send-email-t.gummerer@gmail.com>
Often when looking for something in a downloaded source archive I find myself using git grep --no-index after forgetting to use --no-index the first time and git unhelpfully dies.
This patch series makes git grep implicitly run git grep --no-index when run outside of a repository, analogous to how git diff works when run outside of a repository.
Thomas Gummerer (3): t7810: correct --no-index test builtin/grep: rename use_index to no_index builtin/grep: allow implicit --no-index
builtin/grep.c | 40 ++++++++++++++++++++++++++++------------ t/t7810-grep.sh | 45 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 68 insertions(+), 17 deletions(-)
-- 2.6.3.387.g749a69c.dirty