On Tue, Aug 19, 2014 at 4:33 PM, Chris Packham <judge.packham@xxxxxxxxx> wrote: > Hi, > > I was just setting up a new project using submodules and have run into > what appears to be a hang when git status is invoked. I haven't tried > to reproduce this but this is basically what I did (edited highlights > from my bash_history). > > $ git --version > git version 2.0.3 > $ mkdir proj > $ cd proj > $ git init > $ git submodule add <internal-repo-with-build-scripts> build > $ git submodule add --reference ~/src/linux/.git > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux > # I'm not sure if the --reference is relevant but I was just wanting > to cut down on my network transfer > $ git submodule add <internal-repo-with-skeleton-fs> rootfs > > Oops I really wanted linux-stable to get the same version my board > vendor is using > > $ vim .gitmodules > # change to linux-stable > $ git submodule sync > > I'm not sure if this is a valid use-case but nothing complained that I > was changing the URL. In theory linux-stable should be a super-set of > linus' tree so the repositories are basically equivalent. > > $ cd linux/ > $ git remote show origin > * remote origin > Fetch URL: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git > # Seems to have done the trick > $ git reset --hard v3.4.69 > > I suspect this is where the problem starts. When I did the git > submodule add it was pointing at the tip of linus' tree. Now I have > rewound considerably. > > $ git status > [hang] > > For what it's worth here's the output when I run with GIT_TRACE=1 git status > > trace: built-in: git 'status' > trace: run_command: 'status' '--porcelain' > trace: exec: 'git' 'status' '--porcelain' > trace: built-in: git 'status' '--porcelain' > trace: run_command: 'status' '--porcelain' > trace: exec: 'git' 'status' '--porcelain' > trace: built-in: git 'status' '--porcelain' > trace: run_command: 'status' '--porcelain' > trace: exec: 'git' 'status' '--porcelain' > trace: built-in: git 'status' '--porcelain' > On branch master > > Initial commit > > Changes to be committed: > (use "git rm --cached <file>..." to unstage) > > new file: .gitmodules > new file: rootfs > new file: build > new file: linux > > Changes not staged for commit: > (use "git add <file>..." to update what will be committed) > (use "git checkout -- <file>..." to discard changes in working directory) > > modified: .gitmodules > modified: linux (new commits) > > trace: run_command: 'submodule' 'summary' '--cached' '--for-status' > '--summary-limit' '-1' 'HEAD' > trace: exec: 'git' 'submodule' 'summary' '--cached' '--for-status' > '--summary-limit' '-1' 'HEAD' > trace: exec: 'git-submodule' 'summary' '--cached' '--for-status' > '--summary-limit' '-1' 'HEAD' > trace: run_command: 'git-submodule' 'summary' '--cached' > '--for-status' '--summary-limit' '-1' 'HEAD' > trace: built-in: git 'rev-parse' '--git-dir' > trace: built-in: git 'rev-parse' '-q' '--git-dir' > trace: built-in: git 'rev-parse' '--show-prefix' > trace: built-in: git 'rev-parse' '--show-toplevel' > trace: built-in: git 'rev-parse' '-q' '--verify' '--default' 'HEAD' 'HEAD' > trace: built-in: git 'hash-object' '-w' '-t' 'tree' '--stdin' > trace: built-in: git 'rev-parse' '--show-toplevel' > trace: built-in: git 'rev-parse' '--sq' '--prefix' '' '--' > trace: built-in: git 'diff-index' '--cached' > '--ignore-submodules=dirty' '--raw' > '4b825dc642cb6eb9a060e54bf8d69288fbee4904' '--' > trace: built-in: git 'config' '-f' '.gitmodules' '--get-regexp' > '^submodule\..*\.path$' > trace: built-in: git 'config' 'submodule.rootfs.ignore' > trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.rootfs.ignore' > trace: built-in: git 'config' '-f' '.gitmodules' '--get-regexp' > '^submodule\..*\.path$' > trace: built-in: git 'config' 'submodule.build.ignore' > trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.build.ignore' > trace: built-in: git 'config' '-f' '.gitmodules' '--get-regexp' > '^submodule\..*\.path$' > trace: built-in: git 'config' 'submodule.linux.ignore' > trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.linux.ignore' > trace: built-in: git 'diff-index' '--cached' > '--ignore-submodules=dirty' '--raw' > '4b825dc642cb6eb9a060e54bf8d69288fbee4904' '--' 'rootfs' 'build' > 'linux' > trace: built-in: git 'rev-parse' '-q' '--verify' > 'e4bbdf3b45828a2e9ca37ef329b8e708e324dfb1^0' > trace: built-in: git 'rev-list' '--first-parent' > 'e4bbdf3b45828a2e9ca37ef329b8e708e324dfb1' '--' > trace: built-in: git 'log' '--pretty=format: > %s' '-1' > 'e4bbdf3b45828a2e9ca37ef329b8e708e324dfb1' > trace: built-in: git 'rev-parse' '-q' '--verify' > '9f2d1659df78ea51eaa9ad5e7af9271996ac2a4c^0' > trace: built-in: git 'rev-list' '--first-parent' > '9f2d1659df78ea51eaa9ad5e7af9271996ac2a4c' '--' > trace: built-in: git 'log' '--pretty=format: > %s' '-1' > '9f2d1659df78ea51eaa9ad5e7af9271996ac2a4c' > trace: built-in: git 'rev-parse' '-q' '--verify' > '7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9^0' > trace: built-in: git 'rev-list' '--first-parent' > '7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9' '--' > trace: built-in: git 'log' '--pretty=format: > %s' '-1' > '7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9' > Submodule changes to be committed: > > * rootfs 0000000...e4bbdf3 (249): > > Merge remote-tracking branch 'tomahawk/delivery_545_icmp' > > * build 0000000...9f2d165 (771): > > Merge remote-tracking branch 'plusplus/3rdparty' > > * linux 0000000...7d1311b (46122): > > Linux 3.17-rc1 > > trace: run_command: 'submodule' 'summary' '--files' '--for-status' > '--summary-limit' '-1' > trace: exec: 'git' 'submodule' 'summary' '--files' '--for-status' > '--summary-limit' '-1' > trace: exec: 'git-submodule' 'summary' '--files' '--for-status' > '--summary-limit' '-1' > trace: run_command: 'git-submodule' 'summary' '--files' '--for-status' > '--summary-limit' '-1' > trace: built-in: git 'rev-parse' '--git-dir' > trace: built-in: git 'rev-parse' '-q' '--git-dir' > trace: built-in: git 'rev-parse' '--show-prefix' > trace: built-in: git 'rev-parse' '--show-toplevel' > trace: built-in: git 'rev-parse' '-q' '--verify' '--default' 'HEAD' > trace: built-in: git 'hash-object' '-w' '-t' 'tree' '--stdin' > trace: built-in: git 'rev-parse' '--show-toplevel' > trace: built-in: git 'rev-parse' '--sq' '--prefix' '' '--' > trace: built-in: git 'diff-files' '--ignore-submodules=dirty' '--raw' '--' > trace: built-in: git 'config' '-f' '.gitmodules' '--get-regexp' > '^submodule\..*\.path$' > trace: built-in: git 'config' 'submodule.linux.ignore' > trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.linux.ignore' > trace: built-in: git 'diff-files' '--ignore-submodules=dirty' '--raw' > '--' 'linux' > trace: built-in: git 'rev-parse' 'HEAD' > trace: built-in: git 'rev-parse' '-q' '--verify' > '7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9^0' > trace: built-in: git 'rev-parse' '-q' '--verify' > '14aa272fcd1cdbe7173073250c767bc7a37278ce^0' > trace: built-in: git 'rev-list' '--first-parent' > '7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9...14aa272fcd1cdbe7173073250c767bc7a37278ce' > '--' > trace: built-in: git 'log' '--pretty=format: %m %s' '--first-parent' > '7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9...14aa272fcd1cdbe7173073250c767bc7a37278ce' > ^C Update: I've managed to restore normal operation with 'git add -u' in the super project. Which gets me back to a working state. -- 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