mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-24 10:26:18 +04:00
adding support for jujutsu VCS inside find_workspace resolution (#11685)
This commit is contained in:
parent
c850b90f67
commit
896bf47d8d
@ -225,7 +225,7 @@ fn get_name(v: &Value) -> Option<&str> {
|
|||||||
/// Used as a ceiling dir for LSP root resolution, the filepicker and potentially as a future filewatching root
|
/// Used as a ceiling dir for LSP root resolution, the filepicker and potentially as a future filewatching root
|
||||||
///
|
///
|
||||||
/// This function starts searching the FS upward from the CWD
|
/// This function starts searching the FS upward from the CWD
|
||||||
/// and returns the first directory that contains either `.git`, `.svn` or `.helix`.
|
/// and returns the first directory that contains either `.git`, `.svn`, `.jj` or `.helix`.
|
||||||
/// If no workspace was found returns (CWD, true).
|
/// If no workspace was found returns (CWD, true).
|
||||||
/// Otherwise (workspace, false) is returned
|
/// Otherwise (workspace, false) is returned
|
||||||
pub fn find_workspace() -> (PathBuf, bool) {
|
pub fn find_workspace() -> (PathBuf, bool) {
|
||||||
@ -233,6 +233,7 @@ pub fn find_workspace() -> (PathBuf, bool) {
|
|||||||
for ancestor in current_dir.ancestors() {
|
for ancestor in current_dir.ancestors() {
|
||||||
if ancestor.join(".git").exists()
|
if ancestor.join(".git").exists()
|
||||||
|| ancestor.join(".svn").exists()
|
|| ancestor.join(".svn").exists()
|
||||||
|
|| ancestor.join(".jj").exists()
|
||||||
|| ancestor.join(".helix").exists()
|
|| ancestor.join(".helix").exists()
|
||||||
{
|
{
|
||||||
return (ancestor.to_owned(), false);
|
return (ancestor.to_owned(), false);
|
||||||
|
Loading…
Reference in New Issue
Block a user