~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a couple of safety checks to series creation
[stgit]
/
stgit
/
git.py
diff --git
a/stgit/git.py
b/stgit/git.py
index
d75b54e
..
8523455
100644
(file)
--- a/
stgit/git.py
+++ b/
stgit/git.py
@@
-272,9
+272,11
@@
def rev_parse(git_id):
def branch_exists(branch):
"""Existence check for the named branch
"""
def branch_exists(branch):
"""Existence check for the named branch
"""
- for line in _output_lines(
['git-rev-parse', '--symbolic', '--all']
):
+ for line in _output_lines(
'git-rev-parse --symbolic --all 2>&1'
):
if line.strip() == branch:
return True
if line.strip() == branch:
return True
+ if re.compile('[ |/]'+branch+' ').search(line):
+ raise GitException, 'Bogus branch: %s' % line
return False
def create_branch(new_branch, tree_id = None):
return False
def create_branch(new_branch, tree_id = None):