git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Multiple --reference arguments to submodule add/update

From
TLTim Landscheidt <tim@tim-landscheidt.de>
Date
Mar 7, 2012, 13:59 UTC
Message-ID
<m3hay0ldf4.fsf@passepartout.tim-landscheidt.de>
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
Next: Junio C Hamano
Message 1 of 2 in “Multiple --reference arguments to submodule add/update”
  1. Tim LandscheidtMar 7, 2012
  2. Junio C HamanoMar 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.