git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add --only-merges flag to display only merge commits.

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Apr 9, 2008, 20:38 UTC
Message-ID
<20080409203846.GH11574@genesis.frugalware.org>
In-Reply-To
<7v3apu6bes.fsf@gitster.siamese.dyndns.org>
On Wed, Apr 09, 2008 at 01:06:19PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Miklos Vajna <vmiklos@frugalware.org> writes:
> 
> > This is the opposite of git-rev-list --no-merges: It will hide commits
> > with single or no parent.
> >
> > It is useful if a maintainer has a lot of commits between tags and
> > usually each feature is developed in its own topic branch.
> 
> For that particular use case, I'd suggest --first-parent.  It is not just
> about filtering the output but more importantly also affects the way the
> traversal is done (it does not descend into side branches).  It simply is
> more suited for the job you described.

Hm I was not exactly correct. Trivial fixes are pushed to master directly, so just --first-parent won't solve my problem.

> It is very much unclear if the --only-merges is a very common thing for
> people to want to do, and it is very clear what --only-merges does is a
> very narrow single purpose filtering.

OK, that's something others should decide. :-) I find it useful but maybe it's not commonly useful.

Show 5 quoted lines
> Contrast that to existing --no-merges or --grep.  The former is a very
> narrow single purpose filtering but it is clearly something everybody
> would want to have.  The latter also satisfies a common desire, and it is
> an easy way to query with a customized filtering, e.g. you can use it like
> so: 'log --grep="Merge " v1.5.4..v1.5.5'.

Oh, I forgot about --grep. Though I still think --only-merges would be a solution and --grep="Merge " is just a workaround, in practice it works fine, so thanks for the hint. :-)

Previous: Junio C Hamano
Message 7 of 7 in “Add --only-merges flag to display only merge commits.”
  1. Add --only-merges flag to display only merge commits.Miklos Vajna, Apr 8, 2008
  2. Johannes SchindelinApr 9, 2008
  3. Miklos VajnaApr 9, 2008
  4. Johannes SchindelinApr 9, 2008
  5. Miklos VajnaApr 9, 2008
  6. Junio C HamanoApr 9, 2008
  7. Miklos VajnaApr 9, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.