dag: avoid "git log --reverse" to fix "git dag --follow"
commit90b94d01be7b2647fd04d9ac3c18a64cfde1cd09
authorDavid Aguilar <davvid@gmail.com>
Fri, 11 Oct 2024 10:39:26 +0000 (11 03:39 -0700)
committerDavid Aguilar <davvid@gmail.com>
Fri, 11 Oct 2024 10:54:38 +0000 (11 03:54 -0700)
tree3719d39a5c7119ef4862cb6424c450803472728b
parent90731637d8b42397790c1de23b69f1deb2711c70
dag: avoid "git log --reverse" to fix "git dag --follow"

When using "git log --follow" we end up with truncated output. This is
due to implementation details around how the --reverse option is
implemented in core git. It is arguably a bug.

We also pass `-#` to limit the output (e.g. "-2000"), and this further
hinders the ability to get the right results from git.

Change the commit reader to no longer rely on `--reverse`. We instead
reverse the commit lines ourselves after reading the output from git in
the default topo-order.

Closes: #1327
Reported-by: Michael Baumgartner @BaumiCoder on github
Signed-off-by: David Aguilar <davvid@gmail.com>
CHANGES.rst
cola/models/dag.py
test/dag_test.py