Skip to content

Commit 56d03ad

Browse files
committed
!squash list
1 parent 8def1b0 commit 56d03ad

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/libvcs/cmd/git.py

Lines 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)