Merge pull request #197 from tjlevine/noclobber-fix

Use >| operator in _rebuild_git_index when overwriting .git_index file
This commit is contained in:
Nathan Broadbent
2016-05-14 22:32:25 +07:00

View File

@@ -149,7 +149,7 @@ function _rebuild_git_index() {
IFS=$'\n'
for repo in $(echo -e "$(_find_git_repos)\n$(echo $GIT_REPOS | sed "s/:/\\\\n/g")"); do
echo $(basename $repo | sed "s/ /_/g") $repo
done | sort | cut -d " " -f2- > "$GIT_REPO_DIR/.git_index"
done | sort | cut -d " " -f2- >| "$GIT_REPO_DIR/.git_index"
IFS=$' \t\n'
if [ "$1" != "--silent" ]; then