diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2025-02-18 09:00:12 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-02-18 21:07:06 +1100 |
| commit | e1b0473cec1497e79205f5ba9a101c159dfc809d (patch) | |
| tree | 1f9c8695e37aa93ca51f971c371a07d39c56e092 | |
| parent | 026284deb250ae420ea97f90a716fdda3ab6224f (diff) | |
rc git: remove else after return
| -rw-r--r-- | rc/tools/git.kak | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/rc/tools/git.kak b/rc/tools/git.kak index 5b46d2d8..93623bc4 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -572,15 +572,14 @@ define-command -params 1.. \ if ($diff_line_text !~ m{^[ -]}) { print quote "git blame-jump: recursive blame only works on context or deleted lines"; exit 1; + } + if (not defined $commit) { + $commit = "HEAD"; } else { - if (not defined $commit) { - $commit = "HEAD"; - } else { - $commit = "$commit~" if $diff_line_text =~ m{^[- ]}; - } - printf "echo -to-file '${kak_response_fifo}' -quoting shell %s %s %d %d", - $commit, quote($file), $file_line, ('$cursor_column' - 1); + $commit = "$commit~" if $diff_line_text =~ m{^[- ]}; } + printf "echo -to-file '${kak_response_fifo}' -quoting shell %s %s %d %d", + $commit, quote($file), $file_line, ('$cursor_column' - 1); } } catch %{ echo -to-file '${kak_response_fifo}' -quoting shell -- %val{error} |
