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

Re: Determining commit reachability

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 6, 2010, 06:47 UTC
Message-ID
<7viq2jv05c.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4C83FEC3.3040101@gmail.com>
Artur Skawina <art.08.09@gmail.com> writes:
> Given commit C, refs (branches) R, S and T what would be the best way
> to test whether 'C' is reachable from any of the heads?
Depends on the definition of "best", but I often find myself typing
    git branch --with C

where C often is somewhere between 'master' and 'ko/master' (the 'master' branch everybody else has already seen on k.org). When I have second thoughts sometime after applying a patch directly on top of 'master', I need to see if I have built a new topic branch forking from the faulty commit before rewinding it, as such a topic branch also needs to be rewound.

Previous: Artur SkawinaNext: Sverre Rabbelier
Message 4 of 13 in “Determining commit reachability”
  1. Artur SkawinaSep 5, 2010
  2. Jeff KingSep 6, 2010
  3. Artur SkawinaSep 6, 2010
  4. Junio C HamanoSep 6, 2010
  5. Sverre RabbelierSep 6, 2010
  6. Ævar Arnfjörð BjarmasonSep 6, 2010
  7. Sverre RabbelierSep 6, 2010
  8. Junio C HamanoSep 6, 2010
  9. Documentation: explain "git branch --with"Jonathan Nieder, Sep 7, 2010
  10. Ævar Arnfjörð BjarmasonSep 7, 2010
  11. Junio C HamanoSep 9, 2010
  12. Nguyen Thai Ngoc DuySep 7, 2010
  13. Nguyen Thai Ngoc DuySep 7, 2010

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.