git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to properly rename a repository with submodules
@ 2012-05-20 18:19 Gelonida N
  2012-05-20 18:49 ` Gelonida N
  0 siblings, 1 reply; 2+ messages in thread
From: Gelonida N @ 2012-05-20 18:19 UTC (permalink / raw)
  To: git

Hi,

Today I noticed to my surprise, that a repository with submodules 
contains absolute paths.in the .git file of each sub module.

This is kind of surprising to me and seems to make it absolutely 
impossible to have a non bare git repository on a memory stick.

It also seems to make it impossible to rename a working repository after 
cloning.

So I have three questions.

1.) Is there any way to force git to use relative path names, such, that 
this issue just disappears.

2,) Is there any existing script, that allows me to move a git 
repository to another location without breaking it's sub modules.

3.) Why do these path names have to be absolute? Is this for performance 
reasons? path names relative to the location of the .git file seem to be 
much more flexible / portable.


Thanks in advance for your answers

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to properly rename a repository with submodules
  2012-05-20 18:19 How to properly rename a repository with submodules Gelonida N
@ 2012-05-20 18:49 ` Gelonida N
  0 siblings, 0 replies; 2+ messages in thread
From: Gelonida N @ 2012-05-20 18:49 UTC (permalink / raw)
  To: git

On 05/20/2012 08:19 PM, Gelonida N wrote:
> Hi,
>
> Today I noticed to my surprise, that a repository with submodules
> contains absolute paths.in the .git file of each sub module.
>
> This is kind of surprising to me and seems to make it absolutely
> impossible to have a non bare git repository on a memory stick.
>
> It also seems to make it impossible to rename a working repository after
> cloning.
>
> So I have three questions.
>
> 1.) Is there any way to force git to use relative path names, such, that
> this issue just disappears.
>
> 2,) Is there any existing script, that allows me to move a git
> repository to another location without breaking it's sub modules.
>
> 3.) Why do these path names have to be absolute? Is this for performance
> reasons? path names relative to the location of the .git file seem to be
> much more flexible / portable.
>

It seems this behaviur is just on one of my 'new' machines which was 
upgraded to
Ubuntu 12.04 (git version 1.7.9.5)


on my old machines I had either really old git versions or the most 
recent ones 1.7.10


I just added ppa:git-core/ppa to the Ubuntu sources and upgraded git to 
1.7.10

Problem solved!! Path names are now relative. So it seems it wasn't only 
me thinking absolute path names are a bad idea :-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-20 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-20 18:19 How to properly rename a repository with submodules Gelonida N
2012-05-20 18:49 ` Gelonida N

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).