Skip to content

Commit

Permalink
Merge pull request #518 from kgryte/refactor-branch-dropdown
Browse files Browse the repository at this point in the history
Refactor branch menu
  • Loading branch information
telamonian authored Feb 14, 2020
2 parents 576c444 + f75c2a6 commit 14a4e9a
Show file tree
Hide file tree
Showing 36 changed files with 3,036 additions and 1,060 deletions.
5 changes: 3 additions & 2 deletions jupyterlab_git/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,13 @@ def reset_to_commit(self, commit_id, top_repo_path):
)
return my_output

def checkout_new_branch(self, branchname, current_path):
def checkout_new_branch(self, branchname, startpoint, current_path):
"""
Execute git checkout <make-branch> command & return the result.
"""
cmd = ["git", "checkout", "-b", branchname, startpoint]
p = Popen(
["git", "checkout", "-b", branchname],
cmd,
stdout=PIPE,
stderr=PIPE,
cwd=os.path.join(self.root_dir, current_path),
Expand Down
2 changes: 1 addition & 1 deletion jupyterlab_git/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def post(self):
if data["checkout_branch"]:
if data["new_check"]:
my_output = self.git.checkout_new_branch(
data["branchname"], top_repo_path
data["branchname"], data["startpoint"], top_repo_path
)
else:
my_output = self.git.checkout_branch(data["branchname"], top_repo_path)
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"@jupyterlab/services": "^4.1.0",
"@jupyterlab/terminal": "^1.1.0",
"@jupyterlab/ui-components": "^1.1.0",
"@material-ui/core": "^4.8.2",
"@material-ui/icons": "^4.5.1",
"@phosphor/widgets": "^1.8.0",
"diff-match-patch": "^1.0.4",
"nbdime": "~5.0.1",
Expand Down
213 changes: 0 additions & 213 deletions src/components/BranchHeader.tsx

This file was deleted.

Loading

0 comments on commit 14a4e9a

Please sign in to comment.