- (cd "$GIT_DIR/$remote_top" && find . -type f -print) |
- while read dotslref
- do
- name=`expr "$dotslref" : './\(.*\)'`
- if test "z$head_points_at" = "z$name"
- then
- continue
- fi
- if test "$use_separate_remote" = '' &&
- test "z$origin" = "z$name"
- then
- continue
- fi
- git-repo-config remote."$origin".fetch "refs/heads/${name}:$remote_top/${name}" '^$'
- done &&
+
+ # Set up the mappings to track the remaining branches.
+ case "$use_separate_remote" in
+ t)
+ git-repo-config remote."$origin".fetch \
+ "refs/heads/*:$remote_top/*" '^$'
+ ;;
+ *)
+ (cd "$GIT_DIR/$remote_top" && find . -type f -print) |
+ while read dotslref
+ do
+ name=`expr "$dotslref" : './\(.*\)'`
+ if test "z$head_points_at" = "z$name" ||
+ test "z$origin" = "z$name"
+ then
+ continue
+ fi
+ git-repo-config remote."$origin".fetch \
+ "refs/heads/${name}:$remote_top/${name}" '^$'
+ done
+ ;;
+ esac &&
+