Multiple --reference arguments to submodule add/update

From: Tim Landscheidt <hidden>
Date: 2016-06-15 22:53:14

Hi,

with git 1.7.9.3.362.g71319:

| git submodule update --reference A --reference B --init

will only consider repository B.  This is due to git-submodule.sh's:

| [module_clone()]
|                 if test -n "$reference"
|                 then
|                         git-clone $quiet "$reference" -n "$url" "$path" --separate-git-dir "$gitdir"
|                 else
|                         git-clone $quiet -n "$url" "$path" --separate-git-dir "$gitdir"
|                 fi ||

| [cmd_add()]
|                 --reference)
|                         case "$2" in '') usage ;; esac
|                         reference="--reference=$2"
|                         shift
|                         ;;
|                 --reference=*)
|                         reference="$1"
|                         shift
|                         ;;

| [cmd_update()]
|                 --reference)
|                         case "$2" in '') usage ;; esac
|                         reference="--reference=$2"
|                         orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
|                         shift
|                         ;;
|                 --reference=*)
|                         reference="$1"
|                         ;;

It's trivial to fix this for trivial repository specifiers.
But for specifiers with white space, quote or shell meta
characters, my mind boggles :-).

  Has anyone a nice patch for this?

Tim
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help