From 2133d52fc88c848bbcd23b5fc3e844749b10e409 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sat, 23 Apr 2022 16:34:35 +0200 Subject: [PATCH] zsh:funcs:git-log-staged-files: Add `log.follow` --- .config/zsh/zshrc.d/40-functions.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index cc4b178..7d2faa4 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -442,7 +442,10 @@ git-log-staged-files() { # fatal: empty string is not a valid pathspec. # # As the `git-diff` command can return nothing, this is important. - git log --name-only "$@" -- ${(f)"$(git diff --name-only --cached --diff-filter=a)"} + # + # NOTE: Use `log.follow` instead of `--follow` to support multiple arguments + git -c log.follow log --name-only "$@" -- \ + ${(f)"$(git diff --name-only --cached --diff-filter=a)"} } # Create copy with a .bkp extension