exit 1
fi
+if [ ! -f .gitignore ]; then
+ # We do not want to track .gitignore itself
+ echo ".gitignore" > .gitignore
+fi
+
# Read lines from .hgsub
while read sub; do
# Remove CR (DOS)
git checkout "branches/${branch}"
cd ..
fi
+
+ if ! grep -q "${dest}" .gitignore ; then
+ # Ignore subrepo in top-level git repository
+ echo "${dest}" >> .gitignore
+ fi
else
pushd "${dest}"
git pull