rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

rush: "unable to hash" when using git submodules

Open cluetjen opened this issue 9 years ago • 2 comments

I've a few npm packages currently in one git repository per npm package. For testing I created a new git repository and added the existing projects using git submodules. When I run "rush rebuild" I get the following error:

> Starting task [@40three/ng-data]
fatal: Unable to hash ng-base

Where "ng-base" is the folder of a project added as git submodule. Running "rush rebuild --verbose" reports:

Unable to calculate incremental build state. Instead running full rebuild. Error: Command failed: git hash-object .gitignore README.md common/config/rush/npm-shrinkwrap.json ng-base ng-data rush.json

(Submodules: ng-base and ng-data folder.)

I guess it's getPackageDeps.ts where it seems that all modified files as returned by git should be hashed but git status returns these two directories too because they're submodules.

cluetjen avatar May 24 '17 18:05 cluetjen

It's happening again

fatal: Unable to hash <somesubmodule>
Error calculating the state of the repo. (inner error: Error: Command failed: git hash-object <somesubmodule>
fatal: Unable to hash azure-js-dev-tools
). Continuing without diffing files.

But seems like it's another issue about submodule?

PhoenixHe-NV avatar Aug 08 '19 03:08 PhoenixHe-NV

Could you open a new GitHub issue and provide repro steps?

octogonz avatar Aug 08 '19 22:08 octogonz