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

Re: Marking commits as transitory for git bisect?

From
David Kastrup <dak@gnu.org>
Date
Dec 2, 2009, 11:01 UTC
Message-ID
<87tyw9wsfr.fsf@lola.goethe.zz>
In-Reply-To
<4B164501.7010902@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 16 quoted lines
> David Kastrup venit, vidit, dixit 02.12.2009 10:32:
>> 
>> sometimes there are changes which would seem better to restructure into
>> more than one commit, with a non-operative intermediate state.
>> 
>> What I am thinking of is something like
>> 
>> a) change an API (small but highly intricate patch warranting thorough
>>    line-by-line review to make sure it's fine)
>> b) adapt all existing callers (really large but utterly trivial patch)
>
> A quick solution with current git would be "replace": Say, in
> A-B-C-D
> you want B and C to be considered an "atom" for bisection. So, "git
> replace" C by a commit C' which is B+C squashed and has A as its parent:
> A-C'-D.

That would lose B and C. The idea was to have this available publically.

Show 10 quoted lines
> Alternatively, if you want this to be distributed more easily and think
> of it at the time of committing, producing a DAG like
>
> A--C'--D
>  \    /
>   B--C
>
> with C' as the first parent of D may help during bisection. I.e., you
> keep the detailed history on the side branch and squash it together on
> the --first-parent-line, with C,C' being tree-same.

That would seem to be more or less accomplished by putting B-C on a side-branch, then merge that branch into A (C' basically being the merge commit). So the DAG would be something like

A------D
 \    /
  B--C

If B-C is a local branch, will their history make it through to a remote repository when you push D?

It seems like this workflow could possibly meet my criteria when one has push access to the repo in question. If one passes D upstream via git-format-patch, however, it would appear that just the equivalent of C' makes it upstream, with the B-C history staying local.

Not sure what will happen when upstream pulls D.
Further comments/insights?
-- 
David Kastrup
Previous: Michael J GruberNext: Junio C Hamano
Message 3 of 4 in “Marking commits as transitory for git bisect?”
  1. David KastrupDec 2, 2009
  2. Michael J GruberDec 2, 2009
  3. David KastrupDec 2, 2009
  4. Junio C HamanoDec 2, 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.