git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <derrickstolee@github.com>
To: Junio C Hamano <gitster@pobox.com>, Elijah Newren <newren@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Question: How to find the commits in the ancestry path of seen down to _and_ including a given topic?
Date: Thu, 21 Jul 2022 14:48:35 -0400	[thread overview]
Message-ID: <571ad4e2-e6de-35a2-0d58-2329cf8684ab@github.com> (raw)
In-Reply-To: <xmqqy1wmlbnn.fsf@gitster.g>

On 7/21/2022 11:37 AM, Junio C Hamano wrote:
> Elijah Newren <newren@gmail.com> writes:
> 
>> A simple question that I'm spinning out of [1]: How can I get `git
>> log` to show the commits in the ancestry path from seen, back to *and
>> including* a given topic (but not commits from unrelated topics)?
> 
> Drawing of a sample history, please.
> 
> I feel stupid asking this, but I do not think I even understand what
> the question is X-<.
> 
> Commits that are ancestors of 'seen' and are descendants of the tip
> of the topic?

Have you tried 

  git log --graph --oneline --boundary --ancestry-path <A>...<B>

The triple dots show the symmetric diff, and the --boundary shows
the possible merge-bases. The --ancestry-path option seems to trim
the output significantly in the example I tried.

Thanks,
-Stolee

  reply	other threads:[~2022-07-21 18:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21  7:23 Question: How to find the commits in the ancestry path of seen down to _and_ including a given topic? Elijah Newren
2022-07-21 15:37 ` Junio C Hamano
2022-07-21 18:48   ` Derrick Stolee [this message]
2022-07-21 19:34   ` Elijah Newren
2022-07-22 11:06     ` Derrick Stolee
2022-07-22 23:25       ` Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=571ad4e2-e6de-35a2-0d58-2329cf8684ab@github.com \
    --to=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).