git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 1/2] add a --delete option to git push

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2009, 07:51 UTC
Message-ID
<7v7hx6suiy.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vab22ubr5.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> I do not mean that this new feature is useless nor stupid.  Being able to
> say "git push --delete branch1 branch2" matches _a_ mental model (perhaps
> Hg inspired one) _very_ naturally.  There are branches on the other side,
> and there is a special operation called 'delete' that you can inflict on
> them.
>
> But it is a different mental model of how git natively does "push".
> ...
> These are both valid models.  They just do not mix, so let's avoid
> confusion by not allowing both at the same time.

One more thing. I suspect that adding --delete and nothing else probably makes things worse than not doing anything.

In a mental model where "push there --delete $branch" is natural, there are branches on the other side, and when you run 'push' command, you name the special operation, 'delete', that you would want to inflict on them.

In such a world, there probably are other (perhaps not so special) operations you can inflict on the branches on the other side as well. They are probably called something like:

	push there --create $branch $commit
	push there --update $branch $commit

If you give them only --delete without completing the vocabulary by giving these operations as well, you would force people to mix "git native" world model (i.e. there is no "mode" nor "opration"; there is only "list of instructions, each of which encodes the equivalent of 'mode'") with this Hg-inspired world model.

Previous: Sverre RabbelierNext: Junio C Hamano
Message 13 of 18 in “add a --delete option to git push”
  1. 0/2 add a --delete option to git pushSverre Rabbelier, Aug 14, 2009
  2. 1/2 add a --delete option to git pushSverre Rabbelier, Aug 14, 2009
  3. 2/2 test that git push --delete deletes the remote refSverre Rabbelier, Aug 14, 2009
  4. Jeff KingAug 14, 2009
  5. Sverre RabbelierAug 14, 2009
  6. Jeff KingAug 14, 2009
  7. Sverre RabbelierAug 14, 2009
  8. Jeff KingAug 14, 2009
  9. Junio C HamanoAug 14, 2009
  10. Jeff KingAug 14, 2009
  11. Jeff KingAug 14, 2009
  12. Sverre RabbelierAug 14, 2009
  13. Junio C HamanoAug 14, 2009
  14. Junio C HamanoAug 15, 2009
  15. Sverre RabbelierAug 16, 2009
  16. Jakub NarebskiAug 16, 2009
  17. Jakub NarebskiAug 14, 2009
  18. Jakub NarebskiAug 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.