I’m trying to integrate Pijul in Dunamai, but I’m not sure how best to find the number of patches between a tag and the current patch. I’m looking for an equivalent to darcs log --from-tag {tag} --count. The best I could come up with currently is:
Use pijul log --output-format json and count the output length (channel_patches)
Use pijul tag and parse/sort to find the ID of the latest tag in the current channel
Side note: Is this output format pretty stable? I can parse it, but just a little worried about breakage since there’s no JSON option.
Use pijul tag checkout {tag} and then pijul channel switch {tag} to load the repo at the tag
Use pijul log --output-format json and count the output length (tag_patches)
Are there any Pijul features that would lead this approach to an incorrect result? Is there a better way to do this that I’ve missed? Any guidance here would be great!
I’m trying to integrate Pijul in Dunamai, but I’m not sure how best to find the number of patches between a tag and the current patch. I’m looking for an equivalent to
darcs log --from-tag {tag} --count
. The best I could come up with currently is:pijul log --output-format json
and count the output length (channel_patches
)pijul tag
and parse/sort to find the ID of the latest tag in the current channelpijul tag checkout {tag}
and thenpijul channel switch {tag}
to load the repo at the tagpijul log --output-format json
and count the output length (tag_patches
)distance = channel_patches - tag_patches
Are there any Pijul features that would lead this approach to an incorrect result? Is there a better way to do this that I’ve missed? Any guidance here would be great!