[PATCH] Follow symlinks when adding changes to git
Lars Flitter
password-store at larsflitter.de
Fri Mar 23 10:32:41 CET 2018
---
src/password-store.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/password-store.sh b/src/password-store.sh
index eac5404..fbcc760 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -35,8 +35,8 @@ set_git() {
}
git_add_file() {
[[ -n $INNER_GIT_DIR ]] || return
- git -C "$INNER_GIT_DIR" add "$1" || return
- [[ -n $(git -C "$INNER_GIT_DIR" status --porcelain "$1") ]] || return
+ git -C "$INNER_GIT_DIR" add "$(readlink -f "$1")" || return
+ [[ -n $(git -C "$INNER_GIT_DIR" status --porcelain "$(readlink -f "$1")") ]] || return
git_commit "$2"
}
git_commit() {
--
2.16.2
More information about the Password-Store
mailing list