How do I `pijul unadd` a file?

I accidentally added the Cargo.lock file to the tree:

$ pijul diff --short
M  Cargo.lock
R  Cargo.lock
R  pijul/src/commands/pushpull.rs

I want to record a change, but only to pushpull.rs. How do I “un-add” Cargo.lock? All of remove, reset, unrecord seem to modify the working tree as well, which I don’t want.

1 Like

pijul remove should do that, what does it do to your working tree?

It leaves the working tree alone, but it also marks the file as to-be-deleted. I don’t want to do that, I only want to not record changes there.

$ pijul diff --short
D  Cargo.lock

R  pijul/src/commands/pushpull.rs

That’s a bug. pijul remove should have an option to also mark the file as to-be-deleted, but it shouldn’t be the default.

Would you mind reporting that on a new discussion in nest.pijul.com/pijul/discussions?

You seem to be running into many bugs today. This is great news for me, because we’

1 Like

How do I pijul unadd a file.

For completeness, when the file to unadd is meant to go in a subsequent record, we can do:

% pijul record -- pijul/src/commands/pushpull.rs
### or just pijul in this case

That is, rather than explicitly unadd, explicitly record the other files.

That doesn’t solve the unwanted Cargo.lock though!
For that case, maybe adding it in .ignore file would do the trick (*), and be a better long term solution anyway.

(*) because, as I guess, you added the directory and not the file explicitly.

I believe this has been reported there: pijul/pijul - Discussion #332 - Cannot un-add a file

Another thing I wanted to mention is, I’ve been stuck with the rewrite of the new backend for about a month now. It has been really frustrating for me to see all this enthusiasm without any real possibility to address any of the bug reports :frowning:

But I’ve started to test the new backend in “test conditions” (small repositories) in the terminal today, so I’m definitely seeing the light at the end of the tunnel.

Anyway, all that to say: thanks for all your bug reports! I really appreciate it. Before the backend madness started, I used to try and compete with bug reports to solve them before the next one appeared. Hopefully I’ll start doing that again soon.

1 Like