Skip to content

Commit 5a3469b

Browse files
committed
Remove unused git.checkout and git.reset functions
Signed-off-by: Peter Grayson <[email protected]>
1 parent 744cb06 commit 5a3469b

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

stgit/git.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -685,15 +685,6 @@ def diff(files=None, rev1='HEAD', rev2=None, diff_flags=[], binary=True):
685685
return b''
686686

687687

688-
def checkout(tree_id):
689-
"""Check out the given tree_id
690-
"""
691-
try:
692-
GRun('read-tree', '--reset', '-u', tree_id).run()
693-
except GitRunException:
694-
raise GitException('Failed "git read-tree" --reset %s' % tree_id)
695-
696-
697688
def switch(tree_id, keep=False):
698689
"""Switch the tree to the given id
699690
"""
@@ -710,17 +701,6 @@ def switch(tree_id, keep=False):
710701
__set_head(tree_id)
711702

712703

713-
def reset(tree_id=None):
714-
"""Revert the tree changes relative to the given tree_id. It removes
715-
any local changes
716-
"""
717-
if not tree_id:
718-
tree_id = get_head()
719-
720-
checkout(tree_id)
721-
__set_head(tree_id)
722-
723-
724704
def apply_patch(filename=None, diff=None, base=None, reject=False, strip=None):
725705
"""Apply a patch onto the current or given index. There must not
726706
be any local changes in the tree, otherwise the command fails

0 commit comments

Comments
 (0)