gitk: Recognize -L option
authorThomas Rast <trast@inf.ethz.ch>
Sat, 16 Nov 2013 17:37:44 +0000 (18:37 +0100)
committerPaul Mackerras <paulus@samba.org>
Sun, 1 Dec 2013 22:24:20 +0000 (09:24 +1100)
This gives line-log support to gitk, by exploiting the new support for
processing and showing "inline" diffs straight from the git-log
output.

Note that we 'set allknown 0', which is a bit counterintuitive since
this is a "known" option. But that flag prevents gitk from thinking
it can optimize the view by running rev-list to see the topology; in
the -L case that doesn't work.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk
diff --git a/gitk b/gitk
index 1f5bc73ebb3ad3f189f5b5a735400f2d1963d4c1..33c3a6c6b3c1b125bbf7f3951e38149742787314 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -235,6 +235,14 @@ proc parseviewargs {n arglist} {
                set filtered 1
                lappend glflags $arg
            }
+           "-L*" {
+               # Line-log with 'stuck' argument (unstuck form is
+               # not supported)
+               set filtered 1
+               set vinlinediff($n) 1
+               set allknown 0
+               lappend glflags $arg
+           }
            "-n" {
                # This appears to be the only one that has a value as a
                # separate word following it