KRGJVI7VFJQKJYV5V2V32RFTXEOV7R7CQN6MEC4KV3EM3MKJHUWAC
Well spotted! Since --channel
changes the current channel, I don’t think it makes sense to use it for a single file.
I just pushed a patch with conflicting arguments, but then changed my mind and amended it, because I still want to leave the possibility to use --dry-run
if the user only wants to see the state of a file in another channel.
Is there a way to change a single file to the version of another channel directly? Instead of:
# on channel main
pijul channel switch b
cp -T "$FILE" "/tmp/$(basename "$FILE")"
pijul channel switch main
cp -T "/tmp/$(basename "$FILE")" "$FILE"
rm "/tmp/$(basename "$FILE")"
That is precisely the goal of the following command: pijul reset --dry-run --channel b file
.
Huh, but it says --dry-run
, thus it should only write the content of the file to stdout, not write it, correct?
I’m looking for a equivalent of git checkout STATE -- FILE
(sometimes git reset STATE -- FILE
works too), but I think reset
is the correct subcommand for this, instead of channel switch
. I don’t think reset
should change the active channel at all (this could be put behind an flag, but I don’t think it should be done at all). pijul channel switch
does that, pijul reset
imo should not do this.
FYI, If I reset a file it does not change a channel, otherwise if reset a whole working dir