mirror of
https://github.com/textmate/textmate.git
synced 2026-01-15 01:38:02 -05:00
This is a wrapper for scm::info_t and is currently not public API but the first brick in a rewritten file browser. Long-term I would like to move/port the scm::info_t code to this class but keep it semi-private as I think only the file browser should be concerned about SCM status. A document should then have a reference to the file item from which it was created (or saved to) and would reference this file item to get its SCM status. Coupling a document to a file item seems to make sense because file items already need to access a document’s modified state, and the file browser / file chooser (⌘T) also show if a file is currently open (and allow it to be closed). Furthermore, both documents and the file browser need to track disk changes and try to track file moves/renames. If a document has a file item reference, it can rely on the file browser (data source) to track moves, and also to avoid opening the same file twice (when done via symbolic links, undetected moves, etc.).