"$@"
}
+visible_repo_name()
+{
+ case "$1" in
+ .)
+ echo "the root directory"
+ ;;
+ *)
+ echo "\"$1\""
+ ;;
+ esac
+}
+
check_mergeconflict()
{
if git ls-files -u | grep ' 1 '; then
done
else
for d in $repos; do
+ dv=`visible_repo_name "$d"`
enter "$d0/$d"
a=
while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
- echo "Branch in \"$d\"?"
+ echo "Branch in $dv?"
read -r a
done
if [ x"$a" = x"y" ]; then
;;
merge)
for d in $repos; do
+ dv=`visible_repo_name "$d"`
enter "$d0/$d"
r=`git symbolic-ref HEAD`
r=${r#refs/heads/}
# we have uncommitted changes
a=
while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
- echo "Could merge from \"master\" into \"$r\" in \"$d\". Do it?"
+ echo "Could merge from \"master\" into \"$r\" in $dv. Do it?"
read -r a
done
if [ x"$a" = x"y" ]; then
;;
push)
for d in $repos; do
+ dv=`visible_repo_name "$d"`
enter "$d0/$d"
r=`git symbolic-ref HEAD`
r=${r#refs/heads/}
# we have uncommitted changes
a=
while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
- echo "Uncommitted changes in \"$r\" in \"$d\". Commit?"
+ echo "Uncommitted changes in \"$r\" in $dv. Commit?"
read -r a
done
if [ x"$a" = x"y" ]; then
if git log "origin/$r".."$r" | grep .; then
a=
while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
- echo "Push \"$r\" in \"$d\"?"
+ echo "Push \"$r\" in $dv?"
read -r a
done
if [ x"$a" = x"y" ]; then