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

Re: Can Git push only first parent history commits?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 8, 2008, 03:00 UTC
Message-ID
<7v7i6bbcc6.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<402F4B33D9C9DE4083DB96B416549FAF9E12@zch01exm23.fsl.freescale.net>

Your drawing nor explanation unfortunately does not make much sense to me, so I'll respond only to the subject.

Pushing only first parent history would mean that the commits you will be transferring will still record their true parents, but you are not sending any parents but the first ones. The repository that receives such a push would not pass fsck, in other words, you are deliberately corrupting the repository.

Naturally we won't support such an operation by default.

It is plausible that you can implement an option to do so, but it would make it hard at the receiving end to tell between a true repository corruption and a corruption you are deliberately introducing by such a push, so it won't be useful unless accompanied by a corresponding option to fsck to make it not complain when parent commits and associated objects that are not necessary for first parent history.

Previous: Li FrankNext: Li Frank
Message 2 of 5 in “Can Git push only first parent history commits?”
  1. Li FrankDec 8, 2008
  2. Junio C HamanoDec 8, 2008
  3. Li FrankDec 8, 2008
  4. Matthieu MoyDec 8, 2008
  5. Boyd Stephen Smith Jr.Dec 8, 2008

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.