Re: Submodule, subtree, or something else?

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

 



On P , 2015-08-24 at 09:51 -0700, Stefan Beller wrote:
> IIUC, the second command will lookup the submodules in $(pwd), but if
> they are not there they are skipped, so all of the existing submodules
> are cloned.
> Why do you need more submodules in the tmp clone than in
> $(pwd)/projectA would be my next question. But I see your point now.

The $(pwd) was just an example to illustrate my point.  The actual use
case is that I would be hacking on something at work, notice that it is
already late and I have to catch the last bus home, yet I don't want to
postpone whatever I was working on until the next day.  So I would do
git commit -a -m "[WIP] Stuff, finish at home" to save my work so far,
go home, and clone / fetch it over ssh.

Another important factor is that a lot of our code can be meaningfully
tested only on the actual hardware, and is built in a VM.  Quite often
getting things right involve many iterations of hack hack hack, git
commit --amend, fetch && reset --hard in the VM, build, test, repeat.
Being able to clone / fetch directly from the copy I am working on makes
it a lot easier.

As I wrote in the other e-mail, I managed to achieve the desired result
by using ./<submodule> (without .git suffix) as the submodule URL, and
creating a file named <submodule> in the bare repo with
'gitdir: ../<submodule.git>' as it's contents, but I'm not sure whether
it is a good idea or not.

Jānis

--
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]