Page MenuHomePhabricator

Support `git notes`
Closed, ResolvedPublic

Description

Diffusion rejects notes associated with commits. Pushing notes fails with the following error message:

remote: [2015-09-10 11:49:10] EXCEPTION: (Exception) Unable to identify the reftype of 'refs/notes/commits'. Rejecting push. at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:414]
remote: arcanist(head=master, ref.master=a5304e472d18), phabricator(head=exper, ref.master=ce7c2097b216, ref.exper=185f42081cfe), phutil(head=master, ref.master=dc0626970a6d)
remote:   #0 DiffusionCommitHookEngine::findGitRefUpdates() called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:220]
remote:   #1 DiffusionCommitHookEngine::findRefUpdates() called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:124]
remote:   #2 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:133]
To ssh://vcs@domain/diffusion/SANDBOX/sandbox.git
 ! [remote rejected] refs/notes/commits -> refs/notes/commits (pre-receive hook declined)
error: failed to push some refs to 'ssh://vcs@domain/diffusion/SANDBOX/sandbox.git'

To reproduce:

git commit --allow-empty -m "Hello"
git notes add -m "Some note"
git push origin refs/notes/commits

Event Timeline

SeMeKh updated the task description. (Show Details)Sep 10 2015, 7:21 AM
SeMeKh added a project: Diffusion.
SeMeKh added a subscriber: SeMeKh.
SeMeKh created this task.
epriestley added a subscriber: epriestley.
epriestley renamed this task from Diffusion rejects git-notes objects to Support `git notes`.
epriestley triaged this task as Wishlist priority.

We do not currently support git notes, and I had never heard of it before this task.

Is this related to T8936? I.e. similar cause?

eadler added a project: Restricted Project.Jan 9 2016, 1:03 AM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
eadler removed a project: Restricted Project.Feb 22 2016, 11:52 PM
bcooksley added a subscriber: bcooksley.

Some parts of KDE use git notes fairly extensively for certain specific workflows.
How difficult would it be to have Phabricator permit pushing Notes, even if Phabricator itself didn't do much with them (doesn't need to display them)?

urzds added a subscriber: urzds.Jul 12 2017, 11:15 AM
epriestley moved this task from Backlog to "Track Only" on the Diffusion board.Apr 15 2019, 3:39 PM
epriestley closed this task as Resolved.Apr 15 2019, 5:14 PM
epriestley claimed this task.

D20420 accepts these refs. We don't show notes in the UI, but we have no outstanding customer requests for this.