cvsimport: add <remote>/HEAD reference in separate remotes more
[gitweb.git] / git-repack.sh
index 4ea6e5b9e5530be4fb53c973df0055b776875742..8c32724be75b77f145106f96257afccb56cfc1ef 100755 (executable)
@@ -69,6 +69,7 @@ if [ -z "$names" ]; then
        echo Nothing new to pack.
 fi
 for name in $names ; do
+       fullbases="$fullbases pack-$name"
        chmod a-w "$PACKTMP-$name.pack"
        chmod a-w "$PACKTMP-$name.idx"
        if test "$quiet" != '-q'; then
@@ -105,8 +106,8 @@ then
                ( cd "$PACKDIR" &&
                  for e in $existing
                  do
-                       case "$e" in
-                       pack-$name) ;;
+                       case " $fullbases " in
+                       *" $e "*) ;;
                        *)      rm -f "$e.pack" "$e.idx" "$e.keep" ;;
                        esac
                  done