summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2024-11-05 18:38:45 +0100
committerErich Eckner <git@eckner.net>2024-11-05 18:38:45 +0100
commit36f29274619d02cf41cc33395d8bd12b5957ec3b (patch)
treed93f26e1242372571c42b5d92ca105123be85a4a
parentfcfb23e77ed6532dfa37827421e204b415ccec9c (diff)
downloadcomputer-time-limit-36f29274619d02cf41cc33395d8bd12b5957ec3b.tar.xz
do not wait for git indefinitely
-rwxr-xr-xcomputer-time-limit2
1 files changed, 1 insertions, 1 deletions
diff --git a/computer-time-limit b/computer-time-limit
index 00d4c86..91b8bce 100755
--- a/computer-time-limit
+++ b/computer-time-limit
@@ -6,7 +6,7 @@ url='https://eckner.net/computer-time-limit.php'
lock_file=~/.computer-time-limit.lock
if [ -d "${dir}"'/.git' ] && [ $# -eq 0 ] && [ "$(stat -c%U "${dir}"'/.git')" = "$(whoami)" ]; then
- git -C "${dir}" fetch --all -p 2>/dev/null
+ timeout 60 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
exec "$0" '-'