X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/01f76ccd02493effc275265ddf3b3f567eedd917..e3960931aafc4841588b0a39d74dfaf768c9219b:/stgit/commands/diff.py diff --git a/stgit/commands/diff.py b/stgit/commands/diff.py index d765784..caa3c5b 100644 --- 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] - if rev[-1] == '/': + if rev.endswith('/'): # 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: