From efee5effcc348d3981e24fad5cbc1ed050d59160 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sun, 16 Jun 2024 21:53:10 +0300 Subject: [PATCH] git: Lower UID limit for configuring git --- git/templates/git.csh.j2 | 2 +- git/templates/git.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git/templates/git.csh.j2 b/git/templates/git.csh.j2 index 107ce34..ba92e36 100644 --- a/git/templates/git.csh.j2 +++ b/git/templates/git.csh.j2 @@ -1,4 +1,4 @@ -if ($uid > 3000 && "`/usr/bin/id -gn`" == "`/usr/bin/id -un`") then +if ($uid > 999 && "`/usr/bin/id -gn`" == "`/usr/bin/id -un`") then if ( "`git config user.name`" == "" ) then git config --global user.name "`getent passwd '${USER}' | cut -d : -f 5`" endif diff --git a/git/templates/git.sh.j2 b/git/templates/git.sh.j2 index 6367672..8749f3d 100644 --- a/git/templates/git.sh.j2 +++ b/git/templates/git.sh.j2 @@ -1,4 +1,4 @@ -if [ $UID -gt 3000 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then +if [ $UID -gt 999 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then if [ -z "$(git config user.name)" ]; then git config --global user.name "$(getent passwd "$USER" | cut -d : -f 5)" fi