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

Re: What's cooking in git.git (Dec 2008, #04; Mon, 29)

From
Christian Couder <chriscool@tuxfamily.org>
Date
Jan 3, 2009, 05:40 UTC
Message-ID
<200901030640.36426.chriscool@tuxfamily.org>
In-Reply-To
<7vocyt1is2.fsf@gitster.siamese.dyndns.org>
Le mardi 30 décembre 2008, Junio C Hamano a écrit :
Show 16 quoted lines
>
> * cc/bisect-replace (Mon Nov 24 22:20:30 2008 +0100) 9 commits
>  - bisect: add "--no-replace" option to bisect without using replace
>    refs
>  - rev-list: make it possible to disable replacing using "--no-
>    bisect-replace"
>  - bisect: use "--bisect-replace" options when checking merge bases
>  - merge-base: add "--bisect-replace" option to use fixed up revs
>  - commit: add "bisect_replace_all" prototype to "commit.h"
>  - rev-list: add "--bisect-replace" to list revisions with fixed up
>    history
>  - Documentation: add "git bisect replace" documentation
>  - bisect: add test cases for "git bisect replace"
>  - bisect: add "git bisect replace" subcommand
>
> I think a mechanism like this should be added to replace grafts, 

The problem with replacing grafts is that a graft can specify many parents for one commit while a ref associates only one object to a name.

One way to overcome this could be to use many refs for each graft, for example (in the packed ref format):

<1st parent sha1> refs/replace/grafts/<commit sha1>-<1st parent sha1> <2nd parent sha1> refs/replace/grafts/<commit sha1>-<2nd parent sha1> ...

Another way would be to put all the parents in the ref name, for example:

<1st parent sha1> /refs/replace/grafts/<commit sha1>-<1st parent sha1>-<2nd parent sha1>-<3rd parent sha1>

There is the same kind of problem to mark many "good" (and "skip") commits when bisecting and we use something like the first solution above:

<1st good commit sha1> refs/bisect/good-<1st good commit sha1> <2nd good commit sha1> refs/bisect/good-<2nd good commit sha1> ...

But I think the above solutions are not very clean and it might be better in the long run to make it possible to associate more than one object to a ref.

Am I missing something? Do you see another way?

Thanks and happy new year everybody, Christian.

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “What's cooking in git.git (Dec 2008, #04; Mon, 29)”
  1. Junio C HamanoDec 30, 2008
  2. Jakub NarebskiDec 30, 2008
  3. Miklos VajnaDec 31, 2008
  4. Junio C HamanoDec 31, 2008
  5. Christian CouderJan 3, 2009
  6. Junio C HamanoJan 3, 2009
  7. Christian CouderJan 4, 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.