zsh:funcs:git-log-staged-files: Add log.follow

This commit is contained in:
2022-04-23 16:34:35 +02:00
parent 1149424d0d
commit 2133d52fc8

View File

@@ -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