mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 13:17:55 -05:00
SCM driver reports if system tracks directories
This can be used to make decisions about whether or not we should assign a virtual status to directories, prune them from a status display, or similar.
This commit is contained in:
@@ -13,7 +13,8 @@ namespace scm
|
||||
virtual std::string branch_name (std::string const& wcPath) const = 0;
|
||||
virtual status_map_t status (std::string const& wcPath) const = 0;
|
||||
|
||||
std::string const& name () const { return _name; }
|
||||
std::string const& name () const { return _name; }
|
||||
virtual bool tracks_directories () const { return false; }
|
||||
|
||||
protected:
|
||||
std::string const& executable () const { return _resolved_executable; }
|
||||
|
||||
@@ -135,6 +135,8 @@ namespace scm
|
||||
return res;
|
||||
}
|
||||
|
||||
bool tracks_directories () const { return true; }
|
||||
|
||||
private:
|
||||
std::string _xslt_path = NULL_STR;
|
||||
};
|
||||
|
||||
@@ -89,9 +89,10 @@ namespace scm
|
||||
ASSERTF(path::is_directory(_wc_path) || !path::exists(_wc_path) || _wc_path == NULL_STR, "Path: %s\n", _wc_path.c_str());
|
||||
}
|
||||
|
||||
std::string info_t::scm_name () const { return _driver->name(); }
|
||||
std::string info_t::path () const { return _wc_path; }
|
||||
std::string info_t::branch () const { return _driver->branch_name(_wc_path); }
|
||||
std::string info_t::scm_name () const { return _driver->name(); }
|
||||
std::string info_t::path () const { return _wc_path; }
|
||||
std::string info_t::branch () const { return _driver->branch_name(_wc_path); }
|
||||
bool info_t::tracks_directories () const { return _driver->tracks_directories(); }
|
||||
|
||||
status::type info_t::status (std::string const& path)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace scm
|
||||
std::string scm_name () const;
|
||||
std::string path () const;
|
||||
std::string branch () const;
|
||||
bool tracks_directories () const;
|
||||
status::type status (std::string const& path);
|
||||
status_map_t files_with_status (int mask);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user