aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-03-02 12:25:41 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-03-02 12:25:41 -0400
commit6a52b663085e95d3ba677d988da7b4057598a3ab (patch)
treefa4766206b31978650567d2523ab65a7d82a30b1
parent75d632fb6ea69541924c54be1dda0f7ce808e83d (diff)
Fix metadata hook behavior when multiple files are added at once. Thanks, Klaus Ethgen.
-rw-r--r--debian/changelog2
-rwxr-xr-xdoc/tips/automatically_adding_metadata/pre-commit-annex4
2 files changed, 4 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 2d7c24370..3ea3cc1af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ git-annex (6.20160230) UNRELEASED; urgency=medium
* Fix data loss that can occur when annex.pidlock is set in a repository.
* Fix bug preventing moving files to/from a repository with annex.pidlock set.
* Fix shared lock file FD leak.
+ * Fix metadata hook behavior when multiple files are added at once.
+ Thanks, Klaus Ethgen.
-- Joey Hess <id@joeyh.name> Mon, 29 Feb 2016 13:00:30 -0400
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