From cf35f11c0f26791b4f7fa3aef50444e9c4bc5f8a Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Tue, 12 May 2020 23:14:14 -0400 Subject: [PATCH] scripts/repo_reset.sh: slightly more advanced --- scripts/repo_reset.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/repo_reset.sh b/scripts/repo_reset.sh index 235b64705..6a3feaeaa 100755 --- a/scripts/repo_reset.sh +++ b/scripts/repo_reset.sh @@ -3,11 +3,14 @@ pentoo_repo=$(portageq get_repo_path / pentoo) #this is a safety check to make sure we aren't force resetting a dev's environment if ! grep 'git@github.com:pentoo/pentoo-overlay.git' "${pentoo_repo}/.git/config"; then if cd "${pentoo_repo}"; then - #should probably add some "is this needed?" detection in here git reset --hard origin git clean -fd git clean -fx fi + #we don't set shallow by default anymore, but if it was installed shallow it stays that way + if [ -f "${pentoo_repo}/.git/shallow" ]; then + git fetch --fatten + fi else printf "Not hard resetting git on developer machine\n" fi