~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the '--undo' option to 'refresh'
[stgit]
/
stgit
/
git.py
diff --git
a/stgit/git.py
b/stgit/git.py
index
d898d85
..
71bddca
100644
(file)
--- a/
stgit/git.py
+++ b/
stgit/git.py
@@
-627,14
+627,15
@@
def switch(tree_id):
__set_head(tree_id)
__set_head(tree_id)
-def reset(files = None, tree_id = None):
+def reset(files = None, tree_id = None
, check_out = True
):
"""Revert the tree changes relative to the given tree_id. It removes
any local changes
"""
if not tree_id:
tree_id = get_head()
"""Revert the tree changes relative to the given tree_id. It removes
any local changes
"""
if not tree_id:
tree_id = get_head()
- checkout(files, tree_id, True)
+ if check_out:
+ checkout(files, tree_id, True)
# if the reset refers to the whole tree, switch the HEAD as well
if not files:
# if the reset refers to the whole tree, switch the HEAD as well
if not files: