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

Re: git branch: multiple --merged and --no-merged options?

From
Jeff King <peff@peff.net>
Date
Mar 23, 2013, 08:13 UTC
Message-ID
<20130323081333.GC29768@sigill.intra.peff.net>
In-Reply-To
<8738vmu92l.fsf@59A2.org>
On Fri, Mar 22, 2013 at 09:46:42PM -0500, Jed Brown wrote:
Show 11 quoted lines
> > On Fri, Mar 15, 2013 at 02:38:12PM -0500, Jed Brown wrote:
> >>   $ git branch --no-merged master --merged next
> >
> > Yeah, sadly that does not work, as we use the same slot for the flag and
> > store only one of the two (and we also allow only one "--merged" head,
> > even though you could in theory want to know "merged to X, or merged to
> > Y").
> 
> Hmm, I would have said conjunction (AND) was more natural than
> disjunction (OR). If we add support for multiple '--merged' and
> '--no-merged', do we expect to eventually have a full query grammar?

Yeah, you might want either. I was just thinking along the lines of the existing --contains and --points-at (which only tag, not branch, knows about), both of which OR multiple items. I think you'd want to flesh out some use cases before deciding.

-Peff
Previous: Jed Brown
Message 4 of 4 in “git branch: multiple --merged and --no-merged options?”
  1. Jed BrownMar 15, 2013
  2. Jeff KingMar 22, 2013
  3. Jed BrownMar 23, 2013
  4. Jeff KingMar 23, 2013

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.