diff options
author | 2016-03-02 12:25:41 -0400 | |
---|---|---|
committer | 2016-03-02 12:25:41 -0400 | |
commit | 6a52b663085e95d3ba677d988da7b4057598a3ab (patch) | |
tree | fa4766206b31978650567d2523ab65a7d82a30b1 /doc | |
parent | 75d632fb6ea69541924c54be1dda0f7ce808e83d (diff) |
Fix metadata hook behavior when multiple files are added at once. Thanks, Klaus Ethgen.
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/tips/automatically_adding_metadata/pre-commit-annex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/tips/automatically_adding_metadata/pre-commit-annex b/doc/tips/automatically_adding_metadata/pre-commit-annex index a77f7a8e3..2e07e3bf4 100755 --- a/doc/tips/automatically_adding_metadata/pre-commit-annex +++ b/doc/tips/automatically_adding_metadata/pre-commit-annex @@ -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 |