4 echo "Usage: $0 upstream origin" >&2
10 local_repo="`basename \"$origin\" .git`"
12 git clone -o upstream "$upstream" "$local_repo" &&
14 git remote add origin "$origin" &&
16 chmod a-x .git/config &&
17 branch="`git branch | awk '/^\*/ {print $2}'`" &&
19 git pull origin $branch &&
22 git config branch.$branch.remote upstream &&
23 git config branch.$branch.remotepush origin &&
24 git config branch.$branch.merge refs/heads/$branch &&
25 git config push.default current &&
27 git gc --aggressive &&
28 exec pwd >> "`dirname \"$0\"`"/locate-all.list