Arc diff fails with fatal: bad object

Hi

I’m working with arc diff for quiet some time, but today it stopped working and I don’t understand why.
When I run arc diff I get this error:

$> arc diff master --nolint
Running unit tests...
No unit test engine is configured for this project.
 PUSH STAGING  Pushing changes to staging area...
fatal: bad object cc9f175978f78b4620c9bb23f4af5a58186aad52
 STAGING FAILED  Unable to push changes to the staging area.
Usage Exception: Failed to push changes to staging area. Correct the issue, or use --skip-staging to skip this step.

Hopefully, someone can help me with this.

The bad object it is referring to is a commit in a submodule, not in the repo I’m trying to push.
What I tried already without success:

  • fresh clone of the repo
  • installing arcanist and libphutil from git (master and stable)

nothing works. Normally I’m working with the arcanist version that comes with Debian.

OS: Debian Testing
git version: git version 2.28.0

The repo is clean, all submodule references are pushed.

$> git status
On branch server_callbacks
Your branch is ahead of 'master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

So I don’t understan why arc is trying to push this commit???

I just created a new Linux user account, setup ssh, git and arcanist.
There it works.

So it is not a system issue. Just something with my normal account.
Still don’t know what could cause this issue.

the arcanist version that comes with Debian

It’s probably a very old version of arcanist - the upstream doesn’t maintain packages for any app repository.
run arc version to get some info about how old it is, and then remove it and install using the official guide (looks like this guide is a bit out-dated itself - libphutil is no longer used).

Then, you can run arc with --trace, where it prints out all the commands it’s running - we might get a clue about what’s going it.

hi, I found out more.

The problem occurs because git config push.recurseSubmodules is set to check.
The problem goes away with git config --global push.recurseSubmodules no.

I think arc could avoid this issue by using the option --no-recurse-submodules.