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