This is a noob question but I'm under the gun to resolve this. I've inherited an odd problem with a git subtree that appears to be repo corruption.
Here's the scenario : a subtree of a git-based project A is being used in project B. Part of the deploy script use pushes the subtree out to project B's repo:
git subtree push -P sub/path/name --squash git@github.com:MyCo/project_b.git projectb_branch
it starts pushing the commits and fails with
"fatal: bad object {sha}"
I've searched for the SHA in the source repo's git log. It shows up in a commit:
git-subtree-dir: app/assets/ui
git-subtree-split: {sha}
The target repo (project_b) does indeed have a commit with that SHA but the source repo does not. I walked through the subtree shell script I can see that it's failing when it tries to look up that object with git log (in the toptree_for_commit function calling git log -l --pretty=format:'%T' {sha}).
At this point I am in way over my head but eager to try to find a solution. I've researched this as far as my limited knowledge permits, so I welcome any tips, tricks or RTFMs that can get me a little closer to a solution.
my sincere thanks!