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

Re: How to substructure rewrites?

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 27, 2014, 15:58 UTC
Message-ID
<xmqqppndpgbg.fsf@gitster.dls.corp.google.com>
In-Reply-To
<877g9ocjsk.fsf@fencepost.gnu.org>
David Kastrup <dak@gnu.org> writes:
Show 18 quoted lines
> As it can easily be guessed, the "add xxx function" commits are
> basically adding not-yet-used code (and so will not disrupt
> compilation), but everything starting with "Reorganize blame data
> structures" up until the final commit will not work or compile since the
> code does not match the data structures.
>
> So there is little point in substructing all that, right?  Even
> something seemingly isolated like
>
> commit f64b41c472442ae9971321fe8f62c3885ba4d8b7
> Author: David Kastrup <dak@gnu.org>
> Date:   Sun Jan 19 02:16:21 2014 +0100
>
>     blame.c: Let output determine MORE_THAN_ONE_PATH more efficiently
>
> is not really useful as a separate commit since while it does implement
> a particular task, this is done starting with non-working code relying
> on no-longer existent data structures.

Small pieces that are incrementally added with their own documentation would certainly be a lot easier to read than one big ball of wax. I am wondering if it would make it easier for everybody to tentatively do "git-blame vs git-blame2" dance here, just like we did "git-blame vs git-annotate" dance some years ago. That is, to add a completely new command and have them in parallel while cooking in 'next' (or we could even keep them in a few releases if we are not absolutely certain about the correctness of the result of the new code), aiming to eventually retire the current implementation and replace it with the new one. We have already have test infrastructure to allow us to run variants of blames, too, to help that kind of transition.

> In general, the rule is likely "any commit should not create a
> non-working state" right?
Yes.
Previous: David KastrupNext: David Kastrup
Message 10 of 11 in “How to substructure rewrites?”
  1. David KastrupJan 25, 2014
  2. 0/3 "Teaser" patch for rewriting blame for efficiencyDavid Kastrup, Jan 25, 2014
  3. 1/3 builtin/blame.c: struct blame_entry does not need a prev linkDavid Kastrup, Jan 25, 2014
  4. 2/3 Eliminate same_suspect function in builtin/blame.cDavid Kastrup, Jan 25, 2014
  5. 3/3 builtin/blame.c: large-scale rewriteDavid Kastrup, Jan 25, 2014
  6. Junio C HamanoJan 27, 2014
  7. David KastrupJan 27, 2014
  8. Junio C HamanoJan 27, 2014
  9. David KastrupJan 27, 2014
  10. Junio C HamanoJan 27, 2014
  11. David KastrupJan 27, 2014

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.