diff options
author | Stefanie Eckner <stefanie@eckner.net> | 2023-12-30 14:11:59 +0100 |
---|---|---|
committer | Stefanie Eckner <stefanie@eckner.net> | 2023-12-30 14:11:59 +0100 |
commit | 4526d55cff4f0142a24cc9bc4e8f5f208b23cca4 (patch) | |
tree | c30372a42ce554dead6db6015fb4078805777ae3 | |
parent | 2151bd95d34176dde2bf62e84daa5fb3f4391a88 (diff) | |
download | computer-time-limit-4526d55cff4f0142a24cc9bc4e8f5f208b23cca4.tar.xz |
only git pull, if git source is ours
-rwxr-xr-x | computer-time-limit | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/computer-time-limit b/computer-time-limit index 45a7ecc..41dfc33 100755 --- a/computer-time-limit +++ b/computer-time-limit @@ -9,7 +9,7 @@ if ! flock -n 9; then exit fi -if [ -d "${dir}"'/.git' ] && [ $# -eq 0 ]; then +if [ -d "${dir}"'/.git' ] && [ $# -eq 0 ] && [ "$(stat -c%U "${dir}"'/.git')" = "$(whoami)" ]; then git -C "${dir}" fetch --all -p 2>/dev/null if [ -z "$(git -C "${dir}" status --porcelain)" ]; then git -C "${dir}" pull --ff-only 2>/dev/null |