Browse Source

Shellcheck correction 2069

2>&1 must be last
svn/root/trunk
cam.lafit 3 years ago
parent
commit
4863ebd9ad
  1. 10
      git_loader.sh

10
git_loader.sh

@ -43,15 +43,15 @@ function clone_git() {
if [ ! -d "$repo_name/.git" ]; then
git init "$repo_name"
git -C "$repo_name" remote add origin "$repo_git" 2>&1 >/dev/null
git -C "$repo_name" remote add origin "$repo_git" >/dev/null 2>&1
fi
git -C "$repo_name" config --add remote.origin.fetch "+refs/svn/map:refs/notes/commits" 2>&1 >/dev/null
git -C "$repo_name" fetch --all -t 2>&1 >/dev/null
git -C "$repo_name" config --add remote.origin.fetch "+refs/svn/map:refs/notes/commits" >/dev/null 2>&1
git -C "$repo_name" fetch --all -t >/dev/null 2>&1
if [[ "$?" != "0" ]]; then
git -C "$repo_name" config --unset-all remote.origin.fetch "\+refs\/svn\/map:refs\/notes\/commits"
git -C "$repo_name" fetch --all -t 2>&1 >/dev/null
git -C "$repo_name" fetch --all -t >/dev/null 2>&1
fi
git -C "$repo_name" reset --hard "$version" 2>&1 >/dev/null
git -C "$repo_name" reset --hard "$version" >/dev/null 2>&1
if [[ "$?" != "0" ]]; then
git -C "$repo_name" checkout --orphan orphan
git -C "$repo_name" reset --hard

Loading…
Cancel
Save