Also copy in worktree add/sycn local.bazelrc if present
This commit is contained in:
@@ -44,6 +44,9 @@ Manage git worktrees by branch name."
|
|||||||
_autoenv_authorized $wt_dest/.enter yes
|
_autoenv_authorized $wt_dest/.enter yes
|
||||||
_autoenv_authorized $wt_dest/.exit yes
|
_autoenv_authorized $wt_dest/.exit yes
|
||||||
fi
|
fi
|
||||||
|
if [ -f $root/local.bazelrc ]; then
|
||||||
|
cp $root/local.bazelrc $wt_dest/local.bazelrc
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cd)
|
cd)
|
||||||
@@ -170,6 +173,15 @@ Manage git worktrees by branch name."
|
|||||||
_autoenv_authorized "$wt_path/$f" yes
|
_autoenv_authorized "$wt_path/$f" yes
|
||||||
print -P "%F{green}updated:%f $wt_path/$f"
|
print -P "%F{green}updated:%f $wt_path/$f"
|
||||||
done
|
done
|
||||||
|
if [[ -f "$root/local.bazelrc" ]]; then
|
||||||
|
if [[ -L "$wt_path/local.bazelrc" ]]; then
|
||||||
|
rm "$wt_path/local.bazelrc"
|
||||||
|
elif [[ -f "$wt_path/local.bazelrc" ]] && cmp -s "$root/local.bazelrc" "$wt_path/local.bazelrc"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
cp "$root/local.bazelrc" "$wt_path/local.bazelrc"
|
||||||
|
print -P "%F{green}updated:%f $wt_path/local.bazelrc"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
return $failed
|
return $failed
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user