While I would ideally like to get the state of a remote from a command like pijul ls-remote … so it could be easier to script, I think at a minimum, it would be nice to see the latest state of certain channels on Nest so it could be scraped with curl … | htmlq …. Currently you must clone/pull the from the channel on the remote & then run pijul log --state --limit 1 | awk '/^State:/ {printf $2}' to get that state.
The use case is wanting to quickly/cheaply see if I am at the latest state of a remote before doing the possibly-expensive task of checking out a project. As the Pijul uses Nix, it should be aware that the fetchers will check out the repository from scratch. We have prefetch scripts & pinning tools (I am currently writing another one myself), but we could save a lot of unnecessary bandwidth if there was a way to see the latest state & compare that with the last known state to shortcut cloning the whole remote just to see “oh, so we were already at the latest state”.
While I would ideally like to get the
stateof a remote from a command likepijul ls-remote …so it could be easier to script, I think at a minimum, it would be nice to see the latest state of certain channels on Nest so it could be scraped withcurl … | htmlq …. Currently you must clone/pull the from the channel on the remote & then runpijul log --state --limit 1 | awk '/^State:/ {printf $2}'to get that state.The use case is wanting to quickly/cheaply see if I am at the latest state of a remote before doing the possibly-expensive task of checking out a project. As the Pijul uses Nix, it should be aware that the fetchers will check out the repository from scratch. We have prefetch scripts & pinning tools (I am currently writing another one myself), but we could save a lot of unnecessary bandwidth if there was a way to see the latest state & compare that with the last known state to shortcut cloning the whole remote just to see “oh, so we were already at the latest state”.
It might also clear up folks not understanding Pijul has a stable reference.