* Question about submodules and absolute paths [not found] <CAOmKuSoYP9fYORDy5twLpFh7SQ7rc6x2A=F8XjfKMqo-ErCauQ@mail.gmail.com> @ 2012-05-22 11:36 ` Alexey Pelykh 2012-05-22 18:27 ` Junio C Hamano 0 siblings, 1 reply; 14+ messages in thread From: Alexey Pelykh @ 2012-05-22 11:36 UTC (permalink / raw) To: git Hello, Is it possible to avoid usage of absolute paths in information about submodule? I'm working with same local repository from both Windows and Linux. But unfortunately absolute paths in modules break all the sweetness, since these paths differ from OS to OS and thus I have to keep two clones of each repository. Regarding absolute paths I refer to are: In ${REPO}/.git/modules/${MODULE_RELATIVE_PATH}/config file: [core] worktree = ${FULL_REPO_PATH}/${MODULE_RELATIVE_PATH} In ${REPO}/${MODULE_RELATIVE_PATH}/.git file: gitdir: ${FULL_REPO_PATH}/.git/modules/${MODULE_RELATIVE_PATH} Thanks, Alexey ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-22 11:36 ` Question about submodules and absolute paths Alexey Pelykh @ 2012-05-22 18:27 ` Junio C Hamano 2012-05-22 19:18 ` Alexey Pelykh 0 siblings, 1 reply; 14+ messages in thread From: Junio C Hamano @ 2012-05-22 18:27 UTC (permalink / raw) To: Alexey Pelykh; +Cc: git Alexey Pelykh <alexey.pelykh@gmail.com> writes: > since these paths differ from OS to OS and thus I have to keep two clones of > each repository. I am not sure what "absolute path" has with this. If you are working on two machines, don't you need two clones, one for each, anyway? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-22 18:27 ` Junio C Hamano @ 2012-05-22 19:18 ` Alexey Pelykh 2012-05-22 19:25 ` Matt Seitz (matseitz) 2012-05-23 5:36 ` Johannes Sixt 0 siblings, 2 replies; 14+ messages in thread From: Alexey Pelykh @ 2012-05-22 19:18 UTC (permalink / raw) To: Junio C Hamano; +Cc: git Not on two machines, on single machine but with two OSes Windows + Linux + shared 'work' partition :) So both Windows and Linux use same repo clone that is stored on a 'work' partition. But due to those absolute paths, it gives '/cygdrive/d/work' on windows and '/media/work' on linux. Thus I have to keep 2 copies of each repository that uses submodules (and that is very inconvenient :( ) On Tue, May 22, 2012 at 9:27 PM, Junio C Hamano <gitster@pobox.com> wrote: > Alexey Pelykh <alexey.pelykh@gmail.com> writes: > >> since these paths differ from OS to OS and thus I have to keep two clones of >> each repository. > > I am not sure what "absolute path" has with this. If you are working on > two machines, don't you need two clones, one for each, anyway? ^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: Question about submodules and absolute paths 2012-05-22 19:18 ` Alexey Pelykh @ 2012-05-22 19:25 ` Matt Seitz (matseitz) 2012-05-22 19:29 ` Alexey Pelykh 2012-05-23 5:36 ` Johannes Sixt 1 sibling, 1 reply; 14+ messages in thread From: Matt Seitz (matseitz) @ 2012-05-22 19:25 UTC (permalink / raw) To: Alexey Pelykh, Junio C Hamano; +Cc: git > From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On > Behalf Of Alexey Pelykh > > Not on two machines, on single machine but with two OSes Windows + Linux + > shared 'work' partition :) So both Windows and Linux use same repo clone > that is stored on a 'work' partition. But due to those absolute paths, it > gives '/cygdrive/d/work' on windows and '/media/work' on linux. Thus I > have to keep 2 copies of each repository that uses submodules (and that is > very inconvenient :( ) As a workaround, how about using Cygwin's mount table to mount "/media" to "d:/", or "/media/work" to "d:/work"? See: http://cygwin.com/cygwin-ug-net/using.html#mount-table ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-22 19:25 ` Matt Seitz (matseitz) @ 2012-05-22 19:29 ` Alexey Pelykh 2012-05-22 19:36 ` Matt Seitz (matseitz) 0 siblings, 1 reply; 14+ messages in thread From: Alexey Pelykh @ 2012-05-22 19:29 UTC (permalink / raw) To: Matt Seitz (matseitz); +Cc: Junio C Hamano, git Thanks, Matt. Indeed this is a workaround, what I was thinking about to use. The thing I wanted actually to discuss whether it worth to research possibility of replacing these absolute paths with relative ones. At least afaik, git repo clone is fully portable (movable) except for submodules. So I wanted to ask community if this is an intended behavior, or it may (and should?) be refined. Best regards, Alexey On Tue, May 22, 2012 at 10:25 PM, Matt Seitz (matseitz) <matseitz@cisco.com> wrote: >> From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On >> Behalf Of Alexey Pelykh >> >> Not on two machines, on single machine but with two OSes Windows + > Linux + >> shared 'work' partition :) So both Windows and Linux use same repo > clone >> that is stored on a 'work' partition. But due to those absolute paths, > it >> gives '/cygdrive/d/work' on windows and '/media/work' on linux. Thus I >> have to keep 2 copies of each repository that uses submodules (and > that is >> very inconvenient :( ) > > As a workaround, how about using Cygwin's mount table to mount "/media" > to "d:/", or "/media/work" to "d:/work"? > > See: > http://cygwin.com/cygwin-ug-net/using.html#mount-table > ^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: Question about submodules and absolute paths 2012-05-22 19:29 ` Alexey Pelykh @ 2012-05-22 19:36 ` Matt Seitz (matseitz) 2012-05-22 20:25 ` Alexey Pelykh 0 siblings, 1 reply; 14+ messages in thread From: Matt Seitz (matseitz) @ 2012-05-22 19:36 UTC (permalink / raw) To: Alexey Pelykh; +Cc: Junio C Hamano, git > From: Alexey Pelykh [mailto:alexey.pelykh@gmail.com] > > Indeed this is a workaround, what I was thinking about to use. The thing I > wanted actually to discuss whether it worth to research possibility of > replacing these absolute paths with relative ones. Sure. I just wanted to offer an immediate, interim solution until there is a decision on the permanent solution. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-22 19:36 ` Matt Seitz (matseitz) @ 2012-05-22 20:25 ` Alexey Pelykh 2012-05-22 21:06 ` Junio C Hamano 0 siblings, 1 reply; 14+ messages in thread From: Alexey Pelykh @ 2012-05-22 20:25 UTC (permalink / raw) To: Matt Seitz (matseitz); +Cc: Junio C Hamano, git Getting back to the topic, who has what opinions on it? On Tue, May 22, 2012 at 10:36 PM, Matt Seitz (matseitz) <matseitz@cisco.com> wrote: >> From: Alexey Pelykh [mailto:alexey.pelykh@gmail.com] >> >> Indeed this is a workaround, what I was thinking about to use. The > thing I >> wanted actually to discuss whether it worth to research possibility of >> replacing these absolute paths with relative ones. > > Sure. I just wanted to offer an immediate, interim solution until there > is a decision on the permanent solution. > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-22 20:25 ` Alexey Pelykh @ 2012-05-22 21:06 ` Junio C Hamano 2012-05-23 7:24 ` Jens Lehmann 0 siblings, 1 reply; 14+ messages in thread From: Junio C Hamano @ 2012-05-22 21:06 UTC (permalink / raw) To: Alexey Pelykh; +Cc: Matt Seitz (matseitz), git, Jens Lehmann Alexey Pelykh <alexey.pelykh@gmail.com> writes: > Getting back to the topic, who has what opinions on it? You wait ;-) I do not think our friends in certain timezones had chance to see your message and think about it yet. Didn't the submodule folks worked on the related area recently, and doesn't the result of their work already in v1.7.10? I am thinking specifically about the series around d75219b (submodules: always use a relative path from gitdir to work tree, 2012-03-04). Jens? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-22 21:06 ` Junio C Hamano @ 2012-05-23 7:24 ` Jens Lehmann 2012-05-23 7:32 ` Alexey Pelykh 0 siblings, 1 reply; 14+ messages in thread From: Jens Lehmann @ 2012-05-23 7:24 UTC (permalink / raw) To: Junio C Hamano; +Cc: Alexey Pelykh, Matt Seitz (matseitz), git Am 22.05.2012 23:06, schrieb Junio C Hamano: > Didn't the submodule folks worked on the related area recently, and > doesn't the result of their work already in v1.7.10? > > I am thinking specifically about the series around d75219b (submodules: > always use a relative path from gitdir to work tree, 2012-03-04). Jens? Yes, these changes should fix the problem described by Alexey. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-23 7:24 ` Jens Lehmann @ 2012-05-23 7:32 ` Alexey Pelykh 2012-05-23 20:42 ` Jens Lehmann 0 siblings, 1 reply; 14+ messages in thread From: Alexey Pelykh @ 2012-05-23 7:32 UTC (permalink / raw) To: Jens Lehmann; +Cc: Junio C Hamano, Matt Seitz (matseitz), git Great! I'll try git from sources then On Wed, May 23, 2012 at 10:24 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote: > > Am 22.05.2012 23:06, schrieb Junio C Hamano: > > Didn't the submodule folks worked on the related area recently, and > > doesn't the result of their work already in v1.7.10? > > > > I am thinking specifically about the series around d75219b (submodules: > > always use a relative path from gitdir to work tree, 2012-03-04). Jens? > > Yes, these changes should fix the problem described by Alexey. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-23 7:32 ` Alexey Pelykh @ 2012-05-23 20:42 ` Jens Lehmann 2012-05-24 5:08 ` Alexey Pelykh 0 siblings, 1 reply; 14+ messages in thread From: Jens Lehmann @ 2012-05-23 20:42 UTC (permalink / raw) To: Alexey Pelykh; +Cc: Junio C Hamano, Matt Seitz (matseitz), git [please do not top-post] Am 23.05.2012 09:32, schrieb Alexey Pelykh: > On Wed, May 23, 2012 at 10:24 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote: >> >> Am 22.05.2012 23:06, schrieb Junio C Hamano: >>> Didn't the submodule folks worked on the related area recently, and >>> doesn't the result of their work already in v1.7.10? >>> >>> I am thinking specifically about the series around d75219b (submodules: >>> always use a relative path from gitdir to work tree, 2012-03-04). Jens? >> >> Yes, these changes should fix the problem described by Alexey. > > Great! I'll try git from sources then But don't forget to re-clone the submodules, the paths won't be updated for existing submodules. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-23 20:42 ` Jens Lehmann @ 2012-05-24 5:08 ` Alexey Pelykh 0 siblings, 0 replies; 14+ messages in thread From: Alexey Pelykh @ 2012-05-24 5:08 UTC (permalink / raw) To: Jens Lehmann; +Cc: Junio C Hamano, Matt Seitz (matseitz), git Thanks for pointing that out On Wed, May 23, 2012 at 11:42 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote: > [please do not top-post] > > Am 23.05.2012 09:32, schrieb Alexey Pelykh: >> On Wed, May 23, 2012 at 10:24 AM, Jens Lehmann <Jens.Lehmann@web.de> >> wrote: >>> >>> Am 22.05.2012 23:06, schrieb Junio C Hamano: >>>> Didn't the submodule folks worked on the related area recently, and >>>> doesn't the result of their work already in v1.7.10? >>>> >>>> I am thinking specifically about the series around d75219b (submodules: >>>> always use a relative path from gitdir to work tree, 2012-03-04). >>>> Jens? >>> >>> Yes, these changes should fix the problem described by Alexey. >> >> Great! I'll try git from sources then > > But don't forget to re-clone the submodules, the paths won't be updated > for existing submodules. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-22 19:18 ` Alexey Pelykh 2012-05-22 19:25 ` Matt Seitz (matseitz) @ 2012-05-23 5:36 ` Johannes Sixt 2012-05-23 5:39 ` Alexey Pelykh 1 sibling, 1 reply; 14+ messages in thread From: Johannes Sixt @ 2012-05-23 5:36 UTC (permalink / raw) To: Alexey Pelykh; +Cc: Junio C Hamano, git Am 5/22/2012 21:18, schrieb Alexey Pelykh: > Not on two machines, on single machine but with two OSes > Windows + Linux + shared 'work' partition :) So both Windows and Linux > use same repo clone that is stored on a 'work' partition. But due to > those absolute paths, it gives '/cygdrive/d/work' on windows and > '/media/work' on linux. Thus I have to keep 2 copies of each > repository that uses submodules (and that is very inconvenient :( ) I think you cannot share the index file between OSes. Even though its file format should be portable, the contents (stat information) is not portable. After you boot into a different OS, you need at least a 'git status' call to populate the index with the stat data from the new OS. -- Hannes ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Question about submodules and absolute paths 2012-05-23 5:36 ` Johannes Sixt @ 2012-05-23 5:39 ` Alexey Pelykh 0 siblings, 0 replies; 14+ messages in thread From: Alexey Pelykh @ 2012-05-23 5:39 UTC (permalink / raw) To: Johannes Sixt; +Cc: Junio C Hamano, git Thanks for pointing this I haven't experienced issue with this. Maybe due to my git on Windows is actually part of cygwin? Or maybe git status is 99% is what I do before any operation with git :) On Wed, May 23, 2012 at 8:36 AM, Johannes Sixt <j.sixt@viscovery.net> wrote: > > Am 5/22/2012 21:18, schrieb Alexey Pelykh: > > Not on two machines, on single machine but with two OSes > > Windows + Linux + shared 'work' partition :) So both Windows and Linux > > use same repo clone that is stored on a 'work' partition. But due to > > those absolute paths, it gives '/cygdrive/d/work' on windows and > > '/media/work' on linux. Thus I have to keep 2 copies of each > > repository that uses submodules (and that is very inconvenient :( ) > > I think you cannot share the index file between OSes. Even though its file > format should be portable, the contents (stat information) is not > portable. After you boot into a different OS, you need at least a 'git > status' call to populate the index with the stat data from the new OS. > > -- Hannes ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2012-05-24 5:08 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CAOmKuSoYP9fYORDy5twLpFh7SQ7rc6x2A=F8XjfKMqo-ErCauQ@mail.gmail.com> 2012-05-22 11:36 ` Question about submodules and absolute paths Alexey Pelykh 2012-05-22 18:27 ` Junio C Hamano 2012-05-22 19:18 ` Alexey Pelykh 2012-05-22 19:25 ` Matt Seitz (matseitz) 2012-05-22 19:29 ` Alexey Pelykh 2012-05-22 19:36 ` Matt Seitz (matseitz) 2012-05-22 20:25 ` Alexey Pelykh 2012-05-22 21:06 ` Junio C Hamano 2012-05-23 7:24 ` Jens Lehmann 2012-05-23 7:32 ` Alexey Pelykh 2012-05-23 20:42 ` Jens Lehmann 2012-05-24 5:08 ` Alexey Pelykh 2012-05-23 5:36 ` Johannes Sixt 2012-05-23 5:39 ` Alexey Pelykh
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 NNTP newsgroup(s).