~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use --refid option even when sending a cover mail
[stgit]
/
stgit
/
git.py
diff --git
a/stgit/git.py
b/stgit/git.py
index
a7b1c3f
..
016bc3a
100644
(file)
--- a/
stgit/git.py
+++ b/
stgit/git.py
@@
-274,7
+274,7
@@
def rev_parse(git_id):
raise GitException, 'Unknown revision: %s' % git_id
def branch_exists(branch):
raise GitException, 'Unknown revision: %s' % git_id
def branch_exists(branch):
- """Exist
a
nce check for the named branch
+ """Exist
e
nce check for the named branch
"""
for line in _output_lines(['git-rev-parse', '--symbolic', '--all']):
if line.strip() == branch:
"""
for line in _output_lines(['git-rev-parse', '--symbolic', '--all']):
if line.strip() == branch:
@@
-308,7
+308,7
@@
def switch_branch(name):
if not branch_exists(new_head):
raise GitException, 'Branch "%s" does not exist' % name
if not branch_exists(new_head):
raise GitException, 'Branch "%s" does not exist' % name
- tree_id = rev_parse(new_head + '^
0
')
+ tree_id = rev_parse(new_head + '^
{commit}
')
if tree_id != get_head():
refresh_index()
if __run('git-read-tree -u -m', [get_head(), tree_id]) != 0:
if tree_id != get_head():
refresh_index()
if __run('git-read-tree -u -m', [get_head(), tree_id]) != 0:
@@
-599,7
+599,7
@@
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 =
'HEAD'
):
"""Revert the tree changes relative to the given tree_id. It removes
any local changes
"""
"""Revert the tree changes relative to the given tree_id. It removes
any local changes
"""