chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the duplicate utils.strip_leading function
[stgit]
/
stgit
/
utils.py
diff --git
a/stgit/utils.py
b/stgit/utils.py
index 2983ea8b0bb42ad2ba574d4b8f5e036e4b642dcb..864975d483947c377ab480048c6ba74a045b3a8d 100644
(file)
--- a/
stgit/utils.py
+++ b/
stgit/utils.py
@@
-379,12
+379,6
@@
STGIT_COMMAND_ERROR = 2 # seems to be a command that failed
STGIT_CONFLICT = 3 # merge conflict, otherwise OK
STGIT_BUG_ERROR = 4 # a bug in StGit
STGIT_CONFLICT = 3 # merge conflict, otherwise OK
STGIT_BUG_ERROR = 4 # a bug in StGit
-def strip_leading(prefix, s):
- """Strip leading prefix from a string. Blow up if the prefix isn't
- there."""
- assert s.startswith(prefix)
- return s[len(prefix):]
-
def add_dict(d1, d2):
"""Return a new dict with the contents of both d1 and d2. In case of
conflicting mappings, d2 takes precedence."""
def add_dict(d1, d2):
"""Return a new dict with the contents of both d1 and d2. In case of
conflicting mappings, d2 takes precedence."""