git submodule: git sync does the wrong thing if the origin URL is relative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following is a test case that demonstrates a problem with the
heuristic that git sync uses to update the origin URL of submodules in
the case that the origin URL of the super module itself is a relative
URL

I think what it should be doing is prefixing the relative path between
the submodule and the supermodule to the supermodules origin URL as
well as doing what it currently does with the suffix.

Does anyone disagree?

jon.

--

#!/bin/sh
mkdir work &&
cd work &&
rm -rf public &&
rm -rf checkout &&
rm -rf private &&
mkdir public &&
mkdir checkout &&
mkdir -p private/progenitor &&
cd private/progenitor &&
git init &&
mkdir child &&
pushd child &&
git init &&
:> .gitignore &&
git add .gitignore &&
git commit -m "initial child" &&
popd &&
git submodule add ../progenitor/child ./child &&
git commit -m "initial progenitor" &&
git clone --bare . ../../public/progenitor.git &&
git clone --bare child ../../public/progenitor/child.git &&
cd ../../checkout &&
git clone ../public/progenitor.git progenitor &&
cd progenitor &&
git submodule init &&
git submodule update --rebase &&
git fetch origin &&
git submodule foreach git fetch origin &&
git remote set-url origin ../../public/progenitor.git &&
git submodule sync &&
git submodule update --rebase &&
git fetch origin &&
git submodule foreach git fetch origin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]