Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 56d03ad

Browse filesBrowse files
committed
!squash list
1 parent 8def1b0 commit 56d03ad
Copy full SHA for 56d03ad

File tree

Expand file treeCollapse file tree

1 file changed

+15
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-3
lines changed

‎src/libvcs/cmd/git.py

Copy file name to clipboardExpand all lines: src/libvcs/cmd/git.py
+15-3Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,9 +2957,9 @@ def save(
29572957

29582958

29592959
GitBranchCommandLiteral = Literal[
2960-
"create", # checkout -b
2961-
"checkout", # checkout
2962-
"_list",
2960+
# "create", # checkout -b
2961+
# "checkout", # checkout
2962+
"--list",
29632963
"move", # branch -m, or branch -M with force
29642964
"copy", # branch -c, or branch -C with force
29652965
"delete", # branch -d, or branch -D /ith force
@@ -3073,3 +3073,15 @@ def create(self, *, branch: str) -> str:
30733073
# Pass-through to run()
30743074
check_returncode=False,
30753075
)
3076+
3077+
def ls(self) -> str:
3078+
"""List branches.
3079+
3080+
Examples
3081+
--------
3082+
>>> GitBranchCmd(path=git_local_clone.path).ls()
3083+
'* master'
3084+
"""
3085+
return self.run(
3086+
"--list",
3087+
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.