소스 검색

Add stash_drop().

Jelmer Vernooij 4 년 전
부모
커밋
d8f0320497
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      dulwich/porcelain.py

+ 10 - 1
dulwich/porcelain.py

@@ -1809,7 +1809,7 @@ def stash_push(repo):
 
 
 def stash_pop(repo, index):
-    """Pop a new stash from the stack."""
+    """Pop a stash from the stack."""
     with open_repo_closing(repo) as r:
         from dulwich.stash import Stash
 
@@ -1817,6 +1817,15 @@ def stash_pop(repo, index):
         stash.pop(index)
 
 
+def stash_drop(repo, index):
+    """Drop a stash from the stack."""
+    with open_repo_closing(repo) as r:
+        from dulwich.stash import Stash
+
+        stash = Stash.from_repo(r)
+        stash.drop(index)
+
+
 def ls_files(repo):
     """List all files in an index."""
     with open_repo_closing(repo) as r: