In pijul's project, run:
% pijul patch 8BCdYoFNy8yzudGMCZRNmxvYBDryqqbME1VLPZbJ6R82Q6VDymV4UKKwwcMFkHroV9j2Gw2fZVgsUL7LoJuJC1Es
After line 119:
- Inode, ROOT_INODE, ROOT_KEY, SmallString, SmallStr, ApplyTimestamp};
In "["libpijul", "src", "lib.rs"]":
From line 119:
+ Inode, ROOT_INODE, ROOT_KEY, SmallString, SmallStr, ApplyTimestamp,
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:20
note: Run with `RUST_BACKTRACE=1` for a backtrace.
I'll run a debug build to get a better stacktrace.
So the unwrap() error was in commands/patch.rs:
let (_, line_num) = *(buf.numbers.get(&key)).unwrap();
If I'm guessing correctly, the assumption was that every line (or node) had a line number, which appears not always to be the case. Changing it to default to current + 1 seems to fix it and give the expected output.
current + 1
As far as I can tell, the patch fixes the panic error.
@pmeunier Can you confirm that this is the right fix? I get the same error on the current master
I don't think this is actually the right fix, the same issue happened on the Nest too, and the problem was that the branch was incorrect.
I'll come back to this issue very soon.
What’s the status of this issue? I think I can still reproduce with the current upstream.
I don't think a fix was ever introduced.