diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-01-05 22:01:30 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-05 22:01:30 (GMT) |
commit | 2043ce828e8020778c5460eaf7d5a207317c1c09 (patch) | |
tree | 51a85e0b9679bceb8fa2dfbae89d163e4884e28b /revision.c | |
parent | 2a6c7f996e85aab2173a378349e8c0d952755686 (diff) | |
parent | 794c000267b7bd29024b56e282509a82b31e6fc8 (diff) | |
download | git-2043ce828e8020778c5460eaf7d5a207317c1c09.zip git-2043ce828e8020778c5460eaf7d5a207317c1c09.tar.gz git-2043ce828e8020778c5460eaf7d5a207317c1c09.tar.bz2 |
Merge branch 'rs/log-invert-grep-with-headers'
"git log --invert-grep --author=<name>" used to exclude commits
written by the given author, but now "--invert-grep" only affects
the matches made by the "--grep=<pattern>" option.
* rs/log-invert-grep-with-headers:
log: let --invert-grep only invert --grep
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2498,7 +2498,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg } else if (!strcmp(arg, "--all-match")) { revs->grep_filter.all_match = 1; } else if (!strcmp(arg, "--invert-grep")) { - revs->invert_grep = 1; + revs->grep_filter.no_body_match = 1; } else if ((argcount = parse_long_opt("encoding", argv, &optarg))) { if (strcmp(optarg, "none")) git_log_output_encoding = xstrdup(optarg); @@ -3783,7 +3783,7 @@ static int commit_match(struct commit *commit, struct rev_info *opt) (char *)message, strlen(message)); strbuf_release(&buf); unuse_commit_buffer(commit, message); - return opt->invert_grep ? !retval : retval; + return retval; } static inline int want_ancestry(const struct rev_info *revs) |