diff options
| author | blasty <blasty@local> | 2026-07-25 16:26:40 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-25 16:26:40 +0200 |
| commit | 391422bc805fb8620a77cc3f82787da989f1b2cf (patch) | |
| tree | f9f585a86488cacaa43fb44fc97eaa90433038d9 /experiments | |
| parent | theme: rebuild the code palette on measured contrast, not taste (diff) | |
| download | ida-tui-391422bc805fb8620a77cc3f82787da989f1b2cf.tar.gz ida-tui-391422bc805fb8620a77cc3f82787da989f1b2cf.tar.xz ida-tui-391422bc805fb8620a77cc3f82787da989f1b2cf.zip | |
projects: don't duplicate a binary that's already in the project
`--project fw.json a.elf b.elf` where those are already listed appended them
again, so the project grew a second copy on every launch — each duplicate then
staged its own file, opened its own worker and got its own index entries.
Dedupe on the RESOLVED SOURCE PATH, which is the only identity that's actually
correct here: two different foo.elf from different directories are different
binaries and must both be accepted (the label disambiguator already gives them
foo.elf and foo.elf_2), while ./a.elf, /abs/a.elf and a symlink to it are all the
same file and must collapse to one entry.
* Project.by_source(path) — lookup by realpath.
* Project.add() returns the existing entry instead of appending a duplicate.
* Project.create() drops repeats on one command line too.
* launch.py reports what it did: "added N binary(ies)" / "N already in the
project (matched by path) — left alone", and only rewrites the file when
something actually changed.
Not deduped in _build_refs on load: remove() maps refs to entries by index, so
collapsing there would desync them, and a hand-edited duplicate still works
(labels disambiguate).
tests/test_project.py +8 checks: re-add is a no-op, so are a relative spelling,
a messy ../ path and a symlink; a same-named file from another directory IS
added and gets a distinct label; create() drops repeats. 33/33. Verified on the
real CLI: re-running the reported command leaves the project at 3 entries.
Diffstat (limited to 'experiments')
0 files changed, 0 insertions, 0 deletions
