{"thread":{"id":"11502","subject":"Problem with git ls-files","startedAt":"2008-01-07T04:38:11Z","lastAt":"2008-01-07T05:42:26Z","messageCount":3,"participants":["Imran M Yousuf"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"64618","messageId":"7bfdc29a0801062038j269466fcgaffd2b90d59ebfb4@mail.gmail.com","threadId":"11502","inReplyTo":null,"subject":"Problem with git ls-files","fromName":"Imran M Yousuf","fromEmail":"imyousuf@gmail.com","sentAt":"2008-01-07T04:38:11Z","receivedAt":"2008-01-07T04:38:11Z","isPatch":false,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"Hi all,\n\nI am facing a strange problem with git ls-files in git-submodule. When I do -\necho in modules init with \"$@\" - `git-ls-files --stage` - `git\nls-files --stage -- \"$@\" | grep -e '^160000 '` - `pwd`\nThe output is =\n\nin modules init with d - 100644\nc462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules 160000\n091158296a8f57322f70f3c17e5fcb66687a0970 0 a 160000\n6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b 160000\nc9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c 100644\ne69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt - -\n/home/imyousuf/projects/git-projs/test/super-project/a\n\nIf we format the above output of git list-files --stage we can see the following\n\n100644 c462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules\n160000 091158296a8f57322f70f3c17e5fcb66687a0970 0 a\n160000 6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b\n160000 c9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c\n100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt\n\nIn the output please note the path\n/home/imyousuf/projects/git-projs/test/super-project/a\n\nNow I am providing the output of -\nls -al /home/imyousuf/projects/git-projs/test/super-project/a\n\n drwxr-xr-x 4 imyousuf imyousuf 4096 2008-01-07 10:22 .\n drwxr-xr-x 6 imyousuf imyousuf 4096 2008-01-07 10:22 ..\n -rw-r--r-- 1 imyousuf imyousuf  130 2008-01-07 10:22 a.txt\n drwxr-xr-x 2 imyousuf imyousuf 4096 2008-01-07 10:22 d\n drwxr-xr-x 8 imyousuf imyousuf 4096 2008-01-07 10:22 .git\n -rw-r--r-- 1 imyousuf imyousuf   95 2008-01-07 10:22 .gitmodules\n\n\nNow this is getting really confusing for me, because I get the strange\noutput when I call the git submodule from shell script but after the\nshell script is executed if I do the same command copy and paste in\ngnome-terminal it works fine.\n\nCan someone please tell me what I am doing wrong?\n\nThank you,\n\nImran\n"},{"id":"64619","messageId":"7bfdc29a0801062048w1350fb6etc6bd94c63e42d7dd@mail.gmail.com","threadId":"11502","inReplyTo":"7bfdc29a0801062038j269466fcgaffd2b90d59ebfb4@mail.gmail.com","subject":"Re: Problem with git ls-files","fromName":"Imran M Yousuf","fromEmail":"imyousuf@gmail.com","sentAt":"2008-01-07T04:48:38Z","receivedAt":"2008-01-07T04:48:38Z","isPatch":false,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"For output of git-ls-files is\n\n100644 c462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules\n160000 091158296a8f57322f70f3c17e5fcb66687a0970 0 a\n160000 6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b\n160000 c9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c\n100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt\n\nSorry for the mistake earlier.\n\nThe pastes are also available here.\nhttp://git.pastebin.com/f632762aa\n\nPlease help.\n\nBest regards & thank you,\n\nImran\n\nOn Jan 7, 2008 10:38 AM, Imran M Yousuf <imyousuf@gmail.com> wrote:\n> Hi all,\n>\n> I am facing a strange problem with git ls-files in git-submodule. When I do -\n> echo in modules init with \"$@\" - `git-ls-files --stage` - `git\n> ls-files --stage -- \"$@\" | grep -e '^160000 '` - `pwd`\n> The output is =\n>\n> in modules init with d - 100644\n> c462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules 160000\n> 091158296a8f57322f70f3c17e5fcb66687a0970 0 a 160000\n> 6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b 160000\n> c9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c 100644\n> e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt - -\n> /home/imyousuf/projects/git-projs/test/super-project/a\n>\n> If we format the above output of git list-files --stage we can see the following\n>\n> 100644 c462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules\n> 160000 091158296a8f57322f70f3c17e5fcb66687a0970 0 a\n> 160000 6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b\n> 160000 c9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c\n> 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt\n>\n> In the output please note the path\n> /home/imyousuf/projects/git-projs/test/super-project/a\n>\n> Now I am providing the output of -\n> ls -al /home/imyousuf/projects/git-projs/test/super-project/a\n>\n>  drwxr-xr-x 4 imyousuf imyousuf 4096 2008-01-07 10:22 .\n>  drwxr-xr-x 6 imyousuf imyousuf 4096 2008-01-07 10:22 ..\n>  -rw-r--r-- 1 imyousuf imyousuf  130 2008-01-07 10:22 a.txt\n>  drwxr-xr-x 2 imyousuf imyousuf 4096 2008-01-07 10:22 d\n>  drwxr-xr-x 8 imyousuf imyousuf 4096 2008-01-07 10:22 .git\n>  -rw-r--r-- 1 imyousuf imyousuf   95 2008-01-07 10:22 .gitmodules\n>\n>\n> Now this is getting really confusing for me, because I get the strange\n> output when I call the git submodule from shell script but after the\n> shell script is executed if I do the same command copy and paste in\n> gnome-terminal it works fine.\n>\n> Can someone please tell me what I am doing wrong?\n>\n> Thank you,\n>\n> Imran\n>\n\n\n\n-- \nImran M Yousuf\nEntrepreneur & Software Engineer\nSmart IT Engineering\nDhaka, Bangladesh\nEmail: imran@smartitengineering.com\nMobile: +880-1711402557\n"},{"id":"64621","messageId":"7bfdc29a0801062142w72b5da3dn4a85baa51fab9f96@mail.gmail.com","threadId":"11502","inReplyTo":"7bfdc29a0801062048w1350fb6etc6bd94c63e42d7dd@mail.gmail.com","subject":"Re: Problem with git ls-files","fromName":"Imran M Yousuf","fromEmail":"imyousuf@gmail.com","sentAt":"2008-01-07T05:42:26Z","receivedAt":"2008-01-07T05:42:26Z","isPatch":false,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"Hi All,\n\nI though I should also provide the steps to recreate the scenario.\nPlease create a repo using the sample-repo.txt file. Now you can clone\nthe test-repo/super-project using the attached git-clone script with\nthe command -\n\ngit-clone -w <path-to>/test-repo/super-project\n\nIf the attached git-submodule is used you will be able to see the\noutput of the git-ls-files --stage.\n\nI am eagerly waiting for your help; please HELP.\n\nBest regards & Thank you,\n\nImran\n\nOn Jan 7, 2008 10:48 AM, Imran M Yousuf <imyousuf@gmail.com> wrote:\n> For output of git-ls-files is\n>\n> 100644 c462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules\n> 160000 091158296a8f57322f70f3c17e5fcb66687a0970 0 a\n> 160000 6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b\n> 160000 c9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c\n> 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt\n>\n> Sorry for the mistake earlier.\n>\n> The pastes are also available here.\n> http://git.pastebin.com/f632762aa\n>\n> Please help.\n>\n> Best regards & thank you,\n>\n> Imran\n>\n>\n> On Jan 7, 2008 10:38 AM, Imran M Yousuf <imyousuf@gmail.com> wrote:\n> > Hi all,\n> >\n> > I am facing a strange problem with git ls-files in git-submodule. When I do -\n> > echo in modules init with \"$@\" - `git-ls-files --stage` - `git\n> > ls-files --stage -- \"$@\" | grep -e '^160000 '` - `pwd`\n> > The output is =\n> >\n> > in modules init with d - 100644\n> > c462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules 160000\n> > 091158296a8f57322f70f3c17e5fcb66687a0970 0 a 160000\n> > 6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b 160000\n> > c9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c 100644\n> > e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt - -\n> > /home/imyousuf/projects/git-projs/test/super-project/a\n> >\n> > If we format the above output of git list-files --stage we can see the following\n> >\n> > 100644 c462997b94c371248bf17895ee18e7fbea5bce9b 0 .gitmodules\n> > 160000 091158296a8f57322f70f3c17e5fcb66687a0970 0 a\n> > 160000 6397239aeb662ba96f61b59ccc0a0d0812f48435 0 b\n> > 160000 c9f0a7dedcb4a9daf5a68c37109577d7d177e10b 0 c\n> > 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 main.txt\n> >\n> > In the output please note the path\n> > /home/imyousuf/projects/git-projs/test/super-project/a\n> >\n> > Now I am providing the output of -\n> > ls -al /home/imyousuf/projects/git-projs/test/super-project/a\n> >\n> >  drwxr-xr-x 4 imyousuf imyousuf 4096 2008-01-07 10:22 .\n> >  drwxr-xr-x 6 imyousuf imyousuf 4096 2008-01-07 10:22 ..\n> >  -rw-r--r-- 1 imyousuf imyousuf  130 2008-01-07 10:22 a.txt\n> >  drwxr-xr-x 2 imyousuf imyousuf 4096 2008-01-07 10:22 d\n> >  drwxr-xr-x 8 imyousuf imyousuf 4096 2008-01-07 10:22 .git\n> >  -rw-r--r-- 1 imyousuf imyousuf   95 2008-01-07 10:22 .gitmodules\n> >\n> >\n> > Now this is getting really confusing for me, because I get the strange\n> > output when I call the git submodule from shell script but after the\n> > shell script is executed if I do the same command copy and paste in\n> > gnome-terminal it works fine.\n> >\n> > Can someone please tell me what I am doing wrong?\n> >\n> > Thank you,\n> >\n> > Imran\n> >\n>\n>\n>\n> --\n> Imran M Yousuf\n> Entrepreneur & Software Engineer\n> Smart IT Engineering\n> Dhaka, Bangladesh\n> Email: imran@smartitengineering.com\n> Mobile: +880-1711402557\n>\n\n\n\n-- \nImran M Yousuf\nEntrepreneur & Software Engineer\nSmart IT Engineering\nDhaka, Bangladesh\nEmail: imran@smartitengineering.com\nMobile: +880-1711402557\n\n\nmkdir test-repo\ncd test-repo/\nmkdir submodules\nmkdir submodules/a \nmkdir submodules/b\ncd submodules/a/\ntouch a.txt; echo sample text for a.txt >> ./a.txt; git-init; git-add a.txt; git-commit -a -m \"First commit on a\"\ncd ../b/\ntouch b.txt; echo sample text for b.txt >> ./b.txt; git-init; git-add b.txt; git-commit -a -m \"First commit on b\"\ncd ../a/\ngit-submodule add ../b/; git-commit -a -m \"committing with submodule b\"\ncd ../../\nmkdir super-project\ncd super-project/\ntouch main.txt; echo sample text for main.txt >> ./main.txt; git-init; git-add main.txt; git-submodule add ../submodules/a; git-commit -a -m \"First commit on super project\";\n\n"}]}