1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/diffusion
epriestley 02c3200867 Respond more gracefully when a git push deletes a nonexistent ref
Summary:
Fixes T5534. If you `git push origin :refs/tags/doesnotexist` (for some non-existing tag), we get a change where both the old and new refs are empty.

We incorrectly call this an "add", because the old ref is empty. Instead, call this a "delete", but skip the logic which would normally mark it dangerous.

(Possibly we should just reject these outright, but Git allows them, so stick with that for now.)

Test Plan:
Pushed nonexistent refs:

```
  $ git push origin :refs/tags/doesnotexist
  remote: warning: Allowing deletion of corrupt ref.
  To ssh://dweller@localhost/diffusion/POEMS/
   - [deleted]         doesnotexist
  $
```

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5534

Differential Revision: https://secure.phabricator.com/D9800
2014-07-10 10:17:17 -07:00
..
application (Redesign) Clean up older "Tile" code 2014-06-03 15:47:27 -07:00
capability Add global "push" policy to Repositories 2013-10-29 15:32:40 -07:00
conduit Remove @group annotations 2014-07-10 08:12:48 +10:00
config Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
controller Remove all device = true from page construction 2014-06-23 15:18:14 -07:00
data Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
doorkeeper fix query for doorkeeper 2014-04-29 15:12:04 -07:00
engine Respond more gracefully when a git push deletes a nonexistent ref 2014-07-10 10:17:17 -07:00
events Various linter fixes. 2014-02-26 12:44:58 -08:00
exception Throw a more tailored exception after failing to resolve a ref 2014-05-13 13:52:33 -07:00
herald Allow users to receive email about pushes via Herald 2014-03-26 13:51:15 -07:00
panel Make many actions require high security 2014-04-30 17:44:59 -07:00
protocol Applied various linter fixes. 2014-06-09 16:04:12 -07:00
query Add GROUP BY to commit query 2014-07-10 10:16:26 -07:00
remarkup Add a Diffusion repository remarkup rule 2013-12-31 11:08:08 -08:00
request Applied various linter fixes. 2014-06-09 16:04:12 -07:00
response Allow Phabricator to serve Mercurial repositories over HTTP 2013-11-06 18:00:42 -08:00
ssh Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
view Remove trailing whitespace. 2014-06-24 03:23:44 +10:00
DiffusionLintSaveRunner.php Provide a rough, unstable API for reporting coverage into Diffusion 2014-05-17 16:10:54 -07:00