Affected Version: 2.1.6
What steps will reproduce the problem?
1. Create a clone of a project locally
2. In patchset-created, set GIT_DIR and GIT_WORK_TREE to the appropriate paths relative to the clone
3. git fetch <any valid ref in the original project> && git checkout FETCH_HEAD
What is the expected output? What do you see instead?
The expected output is to see FETCH_HEAD checked out. Instead, you see a fatal: object [object name] is corrupted.
Please provide any additional information below.
I've tested the core of this hook in a repository not in Gerrit and it works fine. So, Gerrit or JGit is the problem.