print all conflicts in the current channel
README.md

pijul-conflicts

List known conflicts in the current channel without touching the current working copy.

Quick spin

Build with cargo build and run demo.sh from the root of the folder. It'll create a repository in a temporary directory, make some changes to produce a conflict, then print it.

Sample test run

$ ./demo.sh
test: order_conflict in repo /tmp/tmp.L4lZtYD2Cq
On channel main

Conflicts
  order file.txt:2
test: zombies in repo /tmp/tmp.LfiJKvo7tp
On channel main

Conflicts
  zombie line file.txt:2

Caveats

In a helpful message from Pierre-Étienne Meunier (the author of Pijul) on Zulip (here), it was pointed out that this implementation will run in the time linear in the size of the repo which could be an issue for large repositories.

TODO

  • Structure tests better?
  • Figure out ways to produce, detect and print the different kinds of conflicts - libpijul::output lists the different kinds of conflicts that can be returned