mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-16 20:54:27 +00:00
The code in this area gets significantly simpler, since there's no longer any ambiguity to resolve. The scm-record changes expect that any mode changes are represented by file mode sections, and adds UI hooks to simplify working with them (e.g. automatically de-selecting a deletion mode change if any lines in the file are de-selected, since the file still needs to exist to hold those lines). If the user selects a file mode change, the new mode comes back as part of .get_selected_contents(), so we can use this directly to figure out whether the file was removed or just changed.