The sound distributed version control system

#650 Bug: File deletions always included when `pijul diff` is restricted to a subset of files

Opened by ScribblyBirb on February 19, 2022
ScribblyBirb on February 19, 2022

To reproduce:

pijul init
echo "Crotophaga" > FileA
pijul add FileA
echo "sulcirostris" > FileB
pijul add FileB
pijul record -m "Add FileA and FileB"
pijul remove FileA
echo "ani" > FileB
pijul diff FileB

>>>
...
# Hunks

1. File deletion: "FileA" 2.75 "UTF-8"
BF:BFD 3.1 -> 2.45:74/2, BF:BFD 2.74 -> 2.75:75/2
B:BD 2.75 -> 2.76:87/2
- Crotophaga

2. Replacement in "FileB":1 2.30 "UTF-8"
B:BD 2.30 -> 2.31:44/2
  up 2.30, new 0:4, down
- sulcirostris
+ ani

(FileA deletion appears in diff, even though we restricted the diff to FileB)

If a file has been pijul removed, it will always appear with pijul diff, even when you restrict the diff to a subset of files.

This appears with -s as well:

pijul diff -s FileB
>>>
D FileA
R FileB