From 8d79c9c978d87892f685b2a46c8bebec0e667490 Mon Sep 17 00:00:00 2001 From: Sheeza Aziz Date: Tue, 6 Dec 2022 11:11:13 -0500 Subject: [PATCH] . --- jupyterlab_git/git.py | 4 ++++ jupyterlab_git/handlers.py | 4 ++++ src/commandsAndMenu.tsx | 1 + src/model.ts | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/jupyterlab_git/git.py b/jupyterlab_git/git.py index 7b645d5a7..ef118a2b0 100644 --- a/jupyterlab_git/git.py +++ b/jupyterlab_git/git.py @@ -222,6 +222,10 @@ async def config(self, path, **kwargs): return response + def check_ignore(self, path): + # in git.py Git, add a new method check_ignore that execute git check-ignore -z and parse the result to return the list of ignored files; changed_files method is a good example of a similar method. + return + async def changed_files(self, path, base=None, remote=None, single_commit=None): """Gets the list of changed files between two Git refs, or the files changed in a single commit diff --git a/jupyterlab_git/handlers.py b/jupyterlab_git/handlers.py index e7f185bf4..0b7afe58f 100644 --- a/jupyterlab_git/handlers.py +++ b/jupyterlab_git/handlers.py @@ -822,6 +822,10 @@ async def post(self, path: str = ""): self.set_status(500) self.finish(json.dumps(body)) + @tornado.web.authenticated + def check_ignore(self, path): + self.git.check_ignore(self, path) + class GitSettingsHandler(GitHandler): @tornado.web.authenticated diff --git a/src/commandsAndMenu.tsx b/src/commandsAndMenu.tsx index 038dc23d2..8f2ee47f5 100644 --- a/src/commandsAndMenu.tsx +++ b/src/commandsAndMenu.tsx @@ -1387,6 +1387,7 @@ export function addFileBrowserContextMenu( const wasShown = menu.isVisible; const parent = menu.parentMenu; + // need to rmv the ignored files from this const items = toArray(filebrowser.selectedItems()); const statuses = new Set( items diff --git a/src/model.ts b/src/model.ts index fbab8ab8f..5ff02e9b9 100644 --- a/src/model.ts +++ b/src/model.ts @@ -80,6 +80,13 @@ export class GitExtension implements IGitExtension { } } + /** + * Requests the new GET endpoint. + */ + get isIgnored(): Git.IBranch { + return; + } + /** * Branch list for the current repository. */