Files
git/builtin
Junio C Hamano 20e416409f push: do not turn --delete '' into a matching push
When we added a syntax sugar "git push remote --delete <ref>" to
"git push" as a synonym to the canonical "git push remote :<ref>"
syntax at f517f1f2 (builtin-push: add --delete as syntactic sugar
for :foo, 2009-12-30), we weren't careful enough to make sure that
<ref> is not empty.

Blindly rewriting "--delete <ref>" to ":<ref>" means that an empty
string <ref> results in refspec ":", which is the syntax to ask for
"matching" push that does not delete anything.

Worse yet, if there were matching refs that can be fast-forwarded,
they would have been published prematurely, even if the user feels
that they are not ready yet to be pushed out, which would be a real
disaster.

Noticed-by: Tilman Vogel <tilman.vogel@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-23 15:19:34 -08:00
..
2020-09-30 12:53:47 -07:00
2020-07-30 19:18:06 -07:00
2020-10-04 12:49:07 -07:00
2020-09-03 12:37:02 -07:00
2020-08-11 18:04:11 -07:00
2020-09-30 12:53:47 -07:00
2020-07-30 19:18:06 -07:00
2020-07-30 19:18:06 -07:00
2020-10-05 14:01:54 -07:00
2020-03-24 15:04:43 -07:00
2020-08-24 14:54:30 -07:00
2020-09-25 15:25:38 -07:00
2020-04-28 10:47:10 -07:00
2020-03-24 15:04:44 -07:00
2020-05-13 12:19:18 -07:00
2020-09-29 14:01:22 -07:00
2020-09-25 15:25:38 -07:00
2020-07-30 19:18:06 -07:00
2020-09-02 14:39:25 -07:00
2020-09-02 14:39:25 -07:00
2020-04-28 10:47:10 -07:00
2020-07-30 19:18:06 -07:00
2020-08-11 18:04:11 -07:00
2020-09-18 17:58:04 -07:00