Problem
Stage 3 (#65 / PR #67) passes disposable /tmp views of the ancestor and Portage marker into interactive 3-way tools so accidental saves on non-live panes cannot corrupt permanent backups or ._cfg* files.
Stage 4 (manual 2-way merge) still launches tools on the real marker:
meld $path_live $path_new
# kdiff3 / sdiff / imediff / etc. similarly pass real $path_new
For tools where the right pane is fully editable (especially meld), an accidental save on the new-file side can:
- Corrupt the
._cfg0000_* marker if the user later cancels
- Install bad content if they choose replace (
cp $path_new $path_live)
The live file must stay real (intentional save target for meld left pane / vimdiff).
Proposed solution
Reuse the one-file merge-view temp helpers from #67:
my $view_new = make_merge_view_temp($path_new, "new", $cfg_basename);
# rebind $path_new for launch_tool only, then restore + cleanup
Only Stage 4 needs this; Stages 1–2 do not launch interactive tools with editable non-live panes. Stage 5 is prompt-driven special cases.
Acceptance criteria
Related
Non-goals
- Changing Stage 2
diff3 (non-interactive)
- Temp-copying
$path_live or $path_merged
- Merging with the backup-promotion temps (
$path_temp_*)
Problem
Stage 3 (#65 / PR #67) passes disposable
/tmpviews of the ancestor and Portage marker into interactive 3-way tools so accidental saves on non-live panes cannot corrupt permanent backups or._cfg*files.Stage 4 (manual 2-way merge) still launches tools on the real marker:
For tools where the right pane is fully editable (especially meld), an accidental save on the new-file side can:
._cfg0000_*marker if the user later cancelscp $path_new $path_live)The live file must stay real (intentional save target for meld left pane / vimdiff).
Proposed solution
Reuse the one-file merge-view temp helpers from #67:
Only Stage 4 needs this; Stages 1–2 do not launch interactive tools with editable non-live panes. Stage 5 is prompt-driven special cases.
Acceptance criteria
/tmp(or$TMPDIR) copy of$path_new, not the real markertool_introfor 2-way tools notes the new pane is a temporary view when applicableRelated
make_merge_view_temp/cleanup_merge_view_temp)Non-goals
diff3(non-interactive)$path_liveor$path_merged$path_temp_*)