The sound distributed version control system

#95 What does `--change` do when supplied to `pijul reset`?

Closed on November 22, 2020
cole-h on November 17, 2020

I would think that it would reset the current channel to that change (just like --channel would reset the current channel to the specified channel), but it doesn’t appear to do anything.

pmeunier on November 22, 2020

You can’t “reset to a change” in Pijul, you reset to a state. The --change argument is used to reset to the state of the channel given by --channel, and then apply one or more changes.

pmeunier closed this discussion on November 22, 2020
cole-h on November 22, 2020

To confirm my understanding: you switch to a channel that doesn’t have change ABC with pijul reset --channel no-abc, and if you pijul reset --change ABC, it will pull that change (and it’s dependencies)?

pmeunier on November 22, 2020

Nope. If you want to see what ABC would look like on channel no-abc, you do pijul reset --channel no-abc --change ABC. That sets the default channel to no-abc and sets the working copy to no-abc + ABC. The pristine remains unchanged.

cole-h on November 22, 2020

Is there any point to specifying pijul reset --change ABC without --channel no-abc? If not, it would probably be best to annotate it with https://docs.rs/clap/2.33.3/clap/struct.Arg.html#method.requires.

pmeunier on November 23, 2020

There is a point in doing that, for example if you want to test what a change would be like on the current channel, without applying it.

cole-h on November 23, 2020

Ahhhh, I think I understand now.

Thanks for taking the time to explain!