Page MenuHomePhabricator

Remove Git tags from origin causes crash
Closed, ResolvedPublic

Description

First we ran on the local repo

git tag -d rc-99

Then we ran the following command to get the change in origin

$ git push origin :refs/tags/rc-99 --force

Then we got the following error message:

remote: [2014-07-02 16:42:04] EXCEPTION: (CommandException) Command failed with
error #128!
remote: COMMAND
remote: git log --format='%H' '0000000000000000000000000000000000000000' --not -
-all
remote:
remote: STDOUT
remote: (empty)
remote:
remote: STDERR
remote: fatal: bad object 0000000000000000000000000000000000000000
remote:  at [<phutil>/src/future/exec/ExecFuture.php:398]
remote:   #0 ExecFuture::resolvex() called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:550]
remote:   #1 DiffusionCommitHookEngine::findGitContentUpdates(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:245]
remote:   #2 DiffusionCommitHookEngine::findContentUpdates(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:141]
remote:   #3 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:104]
To ssh://git@code.pageuppeople.com/diffusion/P/pageup.git
 ! [remote rejected] rc-99 (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@code.pageuppeople.com/diffusion/P/pageup.git'

Event Timeline

waynea assigned this task to epriestley.
waynea raised the priority of this task from to Needs Triage.
waynea updated the task description. (Show Details)
waynea added a project: Diffusion.
waynea added subscribers: waynea, hach-que.

Update: It looks like the tag does get removed from the origin despite the errors in the terminal.

This works fine for me if the tag exists. When I try to delete a tag which does not exist, it fails.

Is it possible you pushed twice, and/or someone else pushed to delete the tag?

(I'll fix the nonexistent tag issue.)

D9800 should fix this in the nonexistent case. I wasn't able to reproduce the existent case, so I'm guessing this was just an order-of-operations issue, but if that doesn't fix it or you can repro it after D9800, yell at me.

epriestley triaged this task as Normal priority.Jul 2 2014, 8:45 PM