The sound distributed version control system

#561 Return feedback to user

Opened by finchie on November 9, 2021 Feature request
finchie on November 9, 2021

Based on the discussion in #315, this patch implements some basic feedback for commands such as init, reset, log and add.

As this is my first contribution to the Pijul repository, I am very unfamiliar with the codebase. Any feedback would be greatly appreciated!

finchie added a change on November 9, 2021
RVCX3RXDUIL35VU24QGH6WEWSCX5UYBOLLZFIGXWM2NRWMV7D7ZAC
pmeunier on November 23, 2021

Hi! Thanks for the patch. There are three issues in its current version:

  • One is easily fixed by running pijul key prove finchie@ssh.pijul.com. This is a temporary feature, I’m working on something much better to sign patches.
  • The other one is that you’re using eprintln!, which can cause broken pipes errors from Pijul when piped into a command. If you use writeln!(stderr, …) instead, it will work.
  • When you record things with pijul record, you can delete some of the stuff in there (there are a few exceptions). If you get a chance, you can pijul record --amend and remove the hunks introducing just one blank line.
pmeunier on November 23, 2021

Also, you can then just push to this channel again. Patches in discussions aren’t actually applied to anything, they’re just “loose”, so your two version won’t conflict.

pmeunier added tag Reviewing on December 6, 2021
finchie added a change on December 20, 2021
UAXGGNAZFUQX2XTVNITFZG54E2W5V4RKJUGEKN7WD2HDLVT5QG6QC
main
finchie on December 20, 2021

Hello again! I have completely re-done the patch while trying to follow your advice, please let me know what you think!

There should now be output when the user performs any one of the following actions:

  • Create new repository (clone, init etc)
  • Reset repository to last recorded change
  • Print logs when none exist
  • pijul add a directory without --recursive
  • Calls pijul add (this one could probably be improved to include recursively added items)
finchie on December 20, 2021

Working on this patch also gave me some ideas (that may be suited better to a new discussion):

  • When running pijul reset, should the items reset be listed? Maybe if the output was condensed as to not spam the terminal?
  • How should untracked files be handled with pijul reset? Should this behaviour be gated behind a flag?
  • Should --recursive be the default for pijul add?

The more I use pijul, the more fun it is! Thank you so much for your work on this wonderful project :)

pmeunier on February 22, 2023

Yay! I finally found the time to review and apply this change. Thanks a lot!

I’m still keeping this discussion open to keep working on your other proposed changes.

pmeunier added tag Feature request on February 22, 2023
pmeunier removed tag Reviewing on February 22, 2023