{"thread":{"id":"19574","subject":"Problem with submodules","startedAt":"2009-05-29T11:44:50Z","lastAt":"2009-05-29T13:38:32Z","messageCount":2,"participants":["Andrew Neil"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"115004","messageId":"77493F66-6FBF-46E8-AD5B-702DC245AA43@googlemail.com","threadId":"19574","inReplyTo":null,"subject":"Problem with submodules","fromName":"Andrew Neil","fromEmail":"andrew.jr.neil@googlemail.com","sentAt":"2009-05-29T11:44:50Z","receivedAt":"2009-05-29T11:44:50Z","isPatch":false,"sender":{"key":"andrew.jr.neil@googlemail.com","avatar":null},"body":"I am having trouble with submodules on one of my machines. When I run\n`git submodule init`, then `git submodule update`, it looks as though\neverything is going fine, then it crashes out with an error:\n\"pathspec '665a3c' did not match any file known to git.\".\n(The full output is pasted below).\n\nAccording to this article: http://book.git-scm.com/5_submodules.html\nunder the heading \"Pitfalls with submodules\", this error is expected\nto occur if you don't publish changes to a submodule. This doesn't\nseem to be the problem in my case. I have tried installing the same\ngit repository on 2 other machines, and the submodule init/update\ncommands worked fine on both of them. So it looks as though there is\nsomething on one of my machines that is interfering with this process.\n\nI discovered that if I run the `git submodule update` command as sudo,\nthe problem goes away. However, this has the side-effect that the\nsubmodule directories are created with root as the owner.\n\nCan anyone help with this problem?\n\nMuch appreciated,\nDrew\n\n\nHere is the full output of the init/update commands, with my faulty\nmachine:\n\n$ git submodule init\nSubmodule 'vendor/plugins/dataset' (git://github.com/jgarber/ \ndataset.git) registered for path 'vendor/plugins/dataset'\nSubmodule 'vendor/plugins/simply_versioned' (git://github.com/mmower/ \nsimply_versioned.git) registered for path 'vendor/plugins/ \nsimply_versioned'\n$ git submodule update\nInitialized empty Git repository in /Users/drew/web/extensions/ \nchronicle/vendor/plugins/dataset/.git/\nremote: Counting objects: 899, done.\nremote: Compressing objects: 100% (692/692), done.\nremote: Total 899 (delta 539), reused 250 (delta 158)\nReceiving objects: 100% (899/899), 141.93 KiB | 42 KiB/s, done.\nResolving deltas: 100% (539/539), done.\nerror: pathspec '665a3c03f6a65a586839b8de437c60f98177dd78' did not  \nmatch any file(s) known to git.\nUnable to checkout '665a3c03f6a65a586839b8de437c60f98177dd78' in  \nsubmodule path 'vendor/plugins/dataset'\n"},{"id":"115010","messageId":"7FD6E590-8C6F-4DC6-8F64-A52FFCA92515@googlemail.com","threadId":"19574","inReplyTo":"77493F66-6FBF-46E8-AD5B-702DC245AA43@googlemail.com","subject":"Re: Problem with submodules","fromName":"Andrew Neil","fromEmail":"andrew.jr.neil@googlemail.com","sentAt":"2009-05-29T13:38:32Z","receivedAt":"2009-05-29T13:38:32Z","isPatch":false,"sender":{"key":"andrew.jr.neil@googlemail.com","avatar":null},"body":"I found a solution to this here:\n\n\thttp://www.websideattractions.com/2008/10/21/no-color-for-git/\n\nTurns out that the following line in my .profile was messing things up:\n\n\tGREP_OPTIONS=\"--color=always\"; export GREP_OPTIONS\n\nI changed --color=always to auto, and everything works fine now.\n\nCheers,\nDrew\n\n\nOn 29 May 2009, at 12:44, Andrew Neil wrote:\n\n> I am having trouble with submodules on one of my machines. When I run\n> `git submodule init`, then `git submodule update`, it looks as though\n> everything is going fine, then it crashes out with an error:\n> \"pathspec '665a3c' did not match any file known to git.\".\n> (The full output is pasted below).\n>\n> According to this article: http://book.git-scm.com/5_submodules.html\n> under the heading \"Pitfalls with submodules\", this error is expected\n> to occur if you don't publish changes to a submodule. This doesn't\n> seem to be the problem in my case. I have tried installing the same\n> git repository on 2 other machines, and the submodule init/update\n> commands worked fine on both of them. So it looks as though there is\n> something on one of my machines that is interfering with this process.\n>\n> I discovered that if I run the `git submodule update` command as sudo,\n> the problem goes away. However, this has the side-effect that the\n> submodule directories are created with root as the owner.\n>\n> Can anyone help with this problem?\n>\n> Much appreciated,\n> Drew\n>\n>\n> Here is the full output of the init/update commands, with my faulty\n> machine:\n>\n> $ git submodule init\n> Submodule 'vendor/plugins/dataset' (git://github.com/jgarber/ \n> dataset.git) registered for path 'vendor/plugins/dataset'\n> Submodule 'vendor/plugins/simply_versioned' (git://github.com/mmower/ \n> simply_versioned.git) registered for path 'vendor/plugins/ \n> simply_versioned'\n> $ git submodule update\n> Initialized empty Git repository in /Users/drew/web/extensions/ \n> chronicle/vendor/plugins/dataset/.git/\n> remote: Counting objects: 899, done.\n> remote: Compressing objects: 100% (692/692), done.\n> remote: Total 899 (delta 539), reused 250 (delta 158)\n> Receiving objects: 100% (899/899), 141.93 KiB | 42 KiB/s, done.\n> Resolving deltas: 100% (539/539), done.\n> error: pathspec '665a3c03f6a65a586839b8de437c60f98177dd78' did not  \n> match any file(s) known to git.\n> Unable to checkout '665a3c03f6a65a586839b8de437c60f98177dd78' in  \n> submodule path 'vendor/plugins/dataset'\n>\n"}]}