~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix indexing error during "diff -r/"
[stgit]
/
stgit
/
commands
/
diff.py
diff --git
a/stgit/commands/diff.py
b/stgit/commands/diff.py
index
d765784
..
caa3c5b
100644
(file)
--- a/
stgit/commands/diff.py
+++ b/
stgit/commands/diff.py
@@
-56,11
+56,11
@@
def func(parser, options, args):
rev_list_len = len(rev_list)
if rev_list_len == 1:
rev = rev_list[0]
rev_list_len = len(rev_list)
if rev_list_len == 1:
rev = rev_list[0]
- if rev
[-1] == '/'
:
+ if rev
.endswith('/')
:
# the whole patch
# the whole patch
- rev =
rev[:-1]
- if rev
[-1] == '/'
:
- rev =
rev[:-1]
+ rev =
strip_suffix('/', rev)
+ if rev
.endswith('/')
:
+ rev =
strip_suffix('/', rev)
rev1 = rev + '//bottom'
rev2 = rev + '//top'
else:
rev1 = rev + '//bottom'
rev2 = rev + '//top'
else: