Merge branch 'cj/log-invert-grep'

"git log --invert-grep --grep=WIP" will show only commits that do
not have the string "WIP" in their messages.

* cj/log-invert-grep:
  log: teach --invert-grep option
This commit is contained in:
Junio C Hamano
2015-02-11 13:42:39 -08:00
5 changed files with 25 additions and 2 deletions

View File

@ -212,6 +212,21 @@ test_expect_success 'log --grep' '
test_cmp expect actual
'
cat > expect << EOF
second
initial
EOF
test_expect_success 'log --invert-grep --grep' '
git log --pretty="tformat:%s" --invert-grep --grep=th --grep=Sec >actual &&
test_cmp expect actual
'
test_expect_success 'log --invert-grep --grep -i' '
echo initial >expect &&
git log --pretty="tformat:%s" --invert-grep -i --grep=th --grep=Sec >actual &&
test_cmp expect actual
'
test_expect_success 'log --grep option parsing' '
echo second >expect &&
git log -1 --pretty="tformat:%s" --grep sec >actual &&