Fix metadata hook behavior when multiple files are added at once. Thanks, Klaus Ethgen.

This commit is contained in:
Joey Hess 2016-03-02 12:25:41 -04:00
parent 12f7c0724f
commit baa9954e06
Failed to extract signature
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh
#
# Copyright (C) 2014 Joey Hess <id@joeyh.name>
# Copyright (C) 2016 Klaus Ethgen <Klaus@Ethgen.ch>
@ -112,7 +112,7 @@ if [ -n "$*" ]; then
process "$f"
done
else
for f in "$(git diff-index --name-only --cached $against)"; do
git diff-index --name-only --cached $against | while read f; do
process "$f"
done
fi