LJQKSXIDSJ3KCRPC73MYVYVDCPNX3KE6C3TGTMJ5DWDVJGTT36TQC
A35HFO2HOHBJEBTIJUN3RP76427ETPYBZTBZBMDREPLJBQZI3F6AC
Hmm, there’s still something odd
Cloning this repo: git@github.com:rtic-rs/cortex-m-rtic.git
and then running pijul git
succeeds but leaves the following:
❯ git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
.ignore
.pijul/
ci/after-success.sh
ci/install.sh
ci/script.sh
examples/t-init-main.rs
examples/t-resource.rs
examples/t-stask-main.rs
examples/task_named_main.rs
examples/type-usage.rs
macros/src/codegen/spawn_body.rs
tests/multi.rs
nothing added to commit but untracked files present (use "git add" to track)
Looking at which commit deleted macros/src/codegen/spawn_body.rs
❯ git show 524273c96a978299b64e51a9cdcc007585a0f170 --stat
commit 524273c96a978299b64e51a9cdcc007585a0f170
Author: Emil Fresk <emil.fresk@...>
Date: Sun Oct 11 18:38:38 2020 +0200
Now with spawn/schedule from anywhere
examples/schedule.rs | 6 +++---
examples/spawn.rs | 4 +++-
examples/spawn2.rs | 10 ++++++----
macros/Cargo.toml | 2 +-
macros/src/analyze.rs | 1 -
macros/src/check.rs | 62 +++++++++++++++++++++++++++-----------------------------------
macros/src/codegen.rs | 16 ++++++++--------
macros/src/codegen/dispatchers.rs | 20 +-------------------
macros/src/codegen/hardware_tasks.rs | 2 +-
macros/src/codegen/module.rs | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------------------------------
macros/src/codegen/pre_init.rs | 8 ++++----
macros/src/codegen/schedule.rs | 90 ------------------------------------------------------------------------------------------
macros/src/codegen/schedule_body.rs | 59 -----------------------------------------------------------
macros/src/codegen/software_tasks.rs | 89 ++++++++++++++++++++++++++++++++++-------------------------------------------------------
macros/src/codegen/spawn.rs | 121 -------------------------------------------------------------------------------------------------------------------------
macros/src/codegen/spawn_body.rs | 76 ----------------------------------------------------------------------------
macros/src/codegen/timer_queue.rs | 69 ++++++++++++++++++++++-----------------------------------------------
macros/src/codegen/util.rs | 16 +---------------
macros/src/lib.rs | 1 -
19 files changed, 171 insertions(+), 693 deletions(-)
Any insight/pointers welcome :)
First, thanks for the report and the attempts! I started trying things out, and the problem was much simpler than I expected: libpijul::working_copy::filesystem::get_prefix
was returning an error when the prefix wasn’t found.
We do want deleted files to be in the prefixes, in case a commit deletes something at the root of a huge repo.
I tested that hypothesis, which fixed that bug immediately.
On current main (QBTRVXILORX5) with patch from #544:
Expected output would be two changes, one adding and one removing A.
With debug printouts:
Commenting out line 752 of
pijul/src/commands/git.rs
:yields this error:
Which makes sense, the file does not exist and it is not possible to read it and add it.
Curiously, by removing the file altogether from the
prefixes
BTreeSet:lets Pijul pick up the file deletion:
Which is the expected output. However, I am not sure if this is a valid assumption. In order to follow the general pattern done for added files I separated deleted files from
prefixes
intoprefixes_deleted
which then uses the explicitremove_file()
instead.With this change:
I’ll add both changes to the discussion.
Does this explicit
remove_file()
makes sense at all?