From b72ec5e939dcc8bed07a82745be4cd9249565831 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 2 Mar 2018 10:53:32 +0300 Subject: [PATCH] Fix: Run chmod only after clone --- clone | 5 ++--- fork | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/clone b/clone index 94932f2..7ca3a0b 100755 --- a/clone +++ b/clone @@ -16,12 +16,11 @@ if [ -d .git ]; then git remote set-url origin "$origin" else git clone -o origin "$origin" "$local_repo" && - cd "$local_repo" + cd "$local_repo" && + chmod a-x .git/config fi && pwd >> "`dirname \"$0\"`"/locate-all.list && - -chmod a-x .git/config && branch="`git rev-parse --abbrev-ref HEAD`" git config push.default current && diff --git a/fork b/fork index 7782b89..09248da 100755 --- a/fork +++ b/fork @@ -19,12 +19,12 @@ if [ -d .git ]; then else git clone -o upstream "$upstream" "$local_repo" && cd "$local_repo" && - pwd >> "`dirname \"$0\"`"/locate-all.list && + chmod a-x .git/config && git remote add origin "$origin" fi && -chmod a-x .git/config && -branch="`git rev-parse --abbrev-ref HEAD`" +pwd >> "`dirname \"$0\"`"/locate-all.list && +branch="`git rev-parse --abbrev-ref HEAD`" && git pull upstream $branch && git pull origin $branch && -- 2.39.5