]> thyrsus.com Git - src.git/commitdiff
Allow -- as an argument ender in the diff command.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 18 Dec 2014 15:15:59 +0000 (10:15 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 18 Dec 2014 15:15:59 +0000 (10:15 -0500)
NEWS
src

diff --git a/NEWS b/NEWS
index b16735f8f2778ae3c10a77b71edc0bac889ce2a7..c770954e018d7a130fe9eed02a7cd9cac6415dd7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
                        src project news
 
+Repository head:
+   Allow -- as an argument ender in src diff.
+
 0.15: 2014-12-08
    Deal gracefully with directories passed as arguments.
 
diff --git a/src b/src
index 23a9fcd17f844d6040f941aaaf774ecbf27a6486..eee254e5fb0d4cd1b607265931e08b38f41aa350 100755 (executable)
--- a/src
+++ b/src
@@ -1332,8 +1332,10 @@ def diff_method(*args):
     if type(args) == type(()):
         args = list(args)
     diffopts = ""
-    while args and args[0].startswith("-"):
+    while args and args[0] != '--' and args[0].startswith("-"):
         diffopts += " " + args.pop(0)
+    if args and args[0] == '--':
+        args.pop(0)
     if not diffopts:
         diffopts = "-u"
     for arg in ctx.args: