Re: [PATCH v2] log: teach --invert-grep option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Junghans <ottxor@xxxxxxxxxx> writes:

> "git log --grep=<string>" shows only commits with messages that
> match the given string, but sometimes it is useful to be able to
> show only commits that do *not* have certain messages (e.g. "show
> me ones that are not FIXUP commits").
>
> Originally, we had the invert-grep flag in grep_opt, but because
> "git grep --invert-grep" does not make sense except in conjunction
> with "--files-with-matches", which is already covered by
> "--files-without-matches", it was moved it to revisions structure.
> To have the flag there expresses the function to the feature better.
>
> When the newly inserted two tests run, the history would have commits
> with messages "initial", "second", "third", "fourth", "fifth", "sixth"
> and "Second", committed in this order.  The commits that does not match
> either "th" or "Sec" is "second" and "initial". For the case insensitive
> case only "initial" matches.

I see you moved the two bits meant only to be useful during the
review to the commit message proper.  The reason why I omitted the
"Originally, ..." part was because those who are reading "git log
-p" output would not know what the earlier draft had.

I do not mind it either way, though, so let's take this version.

However, I'd have to drop gitk-git/ bit; that part of the tree is
maintained separately and comes from Paul's gitk repository.  I'll
forward only that part of the patch to him when this feature
graduates to 'master'.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]