What is the point of 'pijul patch' without --bin?

I’m not sure what the point of pijul patch without --bin is. The caveat that it is not fit for applying seems to indicate that --bin should at least be the default, if not the only way to use this command.

Sure, it’s not great at the moment, but in the future, I’d like this to evolve into a human-readable version of pijul patch --bin that can be sent and reviewed over email.

1 Like

I think it’s safer to disable it (say, behind a feature flag) until it’s ready to be consumed by apply. Bad PR await us otherwise.

I can only say I use pijul patch quite often when I cannot log to the nest (either because I don’t have Internet at the moment or because the nest is slow when I want to use it, for instance) and I still find it convenient, if not perfect. Maybe we could rename it, for instance pijul show?

What do you use it for? For viewing patches? Maybe it should be named pijul patch --pretty-print

The more I think about it, the more I believe the most suitable solution is to move the patch pretty printing and all the flags I added to pijul patch recently to a new pijul show command. It could be a good opportunity to turn pijul show-dependencies into pijul show <hash> --dependencies or something similar?

That’s probably a good idea.

was there any progress on this?

(or is there actually a way to view patches as a human readable diff that I missed, considering that it works on the nest?)

Currently it’s the only way to view what you have recorded after having recorded it without pushing publicly to Nest. I’d like to see its output under the metadata of each patch with a verbose flag pijul log -v this is how darcs does it. Nobody is expecting the verbose output of pijul log or darcs changes to be functional and directly usable by pijul or darcs – it’s just informational. That’s not to say it wouldn’t be cool if the human readable output of pijul log could just be applied from a pastebin or email and pijul would take care of the rest (finding and pulling the patches from remote branch urls and hashes in the metadata etc).

You mean pijul patch --bin? but is there a way to actually inspect it? if I just print it to the terminal, it looks like garbage :confused:

@yory I mean pijul patch <hash> without --bin. It shows what was recorded in a human readable format. Currently I need to get a patch hash from pijul log and paste that in before I run pijul patch. That workflow is not very ergonomic.

pijul patch --bin is supposed to be a faster way for the protocol to fetch a patch through SSH. This might perhaps be replaced by a simple cat (is it safe to assume that cat always exists on a remote SSH server? what if that server runs Windows?)

If I don’t use --bin I can’t see any output. I think it was disabled, according to previous posts in this thread?