summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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