From: "Íñigo Huguet" <ihuguet@redhat.com>
To: git@vger.kernel.org
Subject: Ordering list of commits by topo-order
Date: Mon, 15 Nov 2021 15:59:59 +0100 [thread overview]
Message-ID: <CACT4oufbbtCUjd1DcBcmUYhh_dmgsXxXLGSCrOstNxrwYEA4Sg@mail.gmail.com> (raw)
Hello, I have a list of hashes of commits which I want to order by
topological order. I'm trying this: `git rev-list --topo-order
--no-walk <commit1> <commit2>`
However, no matter what I do, I always get the 2 commits in the order
I provide them in the input.
As an example, I'm using commits from Linux kernel `e4073430ee1de` and
`0d55b76fd815f4`:
$ git log --topo-order -2 --oneline 0d55b76fd815f4
0d55b76fd815 ath11k: setup REO for WCN6855
e4073430ee1d ath11k: add dp support for WCN6855
$ git rev-list --topo-order --no-walk 0d55b76fd815f4 e4073430ee1de
0d55b76fd815f4d685a62afe44e623501186ceb4
e4073430ee1dec5402a6158755ac8b84eade83c6
$ git rev-list --topo-order --no-walk e4073430ee1de 0d55b76fd815f4
e4073430ee1dec5402a6158755ac8b84eade83c6
0d55b76fd815f4d685a62afe44e623501186ceb4
$ git rev-list --topo-order --no-walk=sorted e4073430ee1de 0d55b76fd815f4
e4073430ee1dec5402a6158755ac8b84eade83c6
0d55b76fd815f4d685a62afe44e623501186ceb4
Is it possible to obtain a fixed list of commits sorted by topological order?
--
Íñigo Huguet
reply other threads:[~2021-11-15 15:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACT4oufbbtCUjd1DcBcmUYhh_dmgsXxXLGSCrOstNxrwYEA4Sg@mail.gmail.com \
--to=ihuguet@redhat.com \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).