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

Re: git-subtree Ready #2

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 21, 2012, 08:44 UTC
Message-ID
<7v4nukinio.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vwr7gitjl.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> greened@obbligato.org (David A. Greene) writes:
>
>> Ok, but we will preserve the history via the subtree merge, yes?
>
> I'll comment on just this part, but a short answer is "no, I do not think
> so".
> ...
> I was saying that the history up to the current state, littered with these
> commits that are not "logical progression" but merely "a snapshot of
> then-current state" may not be worth preserving, with or without better
> messages.
>
> Rewriting the entire history to make it a logical progression just for the
> sake of history is obviously not worth the effort.

Having said all that, my preference is not so strong to out-right veto doing a true merge; I wouldn't lose sleep if we end up merging the tip of your subtree branch with all the history behind it as-is.

BUT.

Even though I freely admit that I was the guilty one who came up with "merge -s subtree", and Linus's "gitk merge" was the original sin, having a subtree merge like gitk, git-gui and gitweb in the history is not without downsides.

The most problematic one that we regularly suffer from is that the commands in the log family cannot work well across a subtree merge with pathspec limiting, e.g. "git log git-gui/po", and we have to resort to something like:

    $ cd git-gui/po &&
      git rev-list --parents HEAD . |
      while read commit parent
      do
        git log --pretty=short $parent..$commit^2 -- :/po
      done | git shortlog -n -e

to achieve what should be a simple "git shortlog -n -e git-gui/po". I suspect that a subtree merge may also lead bisection into uninteresting tangents as it joins otherwise disjoint history.

If we still have an active upstream that grows its history in a separate repository, like gitk and git-gui do, we cannot avoid a subtree merge in order to continue merging from them. Because you seem to be taking over and are going to maintain it as part of git.git proper, eventually aiming to move it out of contrib/, it's just that I do not think it is worth the trouble.

Previous: Junio C HamanoNext: Thomas Rast
Message 14 of 28 in “git-subtree Ready #2”
  1. David A. GreeneFeb 11, 2012
  2. Junio C HamanoFeb 11, 2012
  3. David A. GreeneFeb 11, 2012
  4. David A. GreeneFeb 15, 2012
  5. Jeff KingFeb 15, 2012
  6. David A. GreeneFeb 15, 2012
  7. David A. GreeneFeb 16, 2012
  8. David A. GreeneFeb 20, 2012
  9. Jeff KingFeb 20, 2012
  10. Junio C HamanoFeb 20, 2012
  11. David A. GreeneFeb 21, 2012
  12. Junio C HamanoFeb 21, 2012
  13. Junio C HamanoFeb 21, 2012
  14. Junio C HamanoFeb 21, 2012
  15. Thomas RastFeb 21, 2012
  16. Avery PennarunFeb 24, 2012
  17. Junio C HamanoFeb 24, 2012
  18. Avery PennarunFeb 24, 2012
  19. David A. GreeneFeb 25, 2012
  20. Junio C HamanoFeb 25, 2012
  21. David A. GreeneFeb 25, 2012
  22. Junio C HamanoFeb 27, 2012
  23. Jeff KingFeb 27, 2012
  24. Jeff KingFeb 27, 2012
  25. Jakub NarebskiFeb 28, 2012
  26. Avery PennarunFeb 28, 2012
  27. David A. GreeneMar 2, 2012
  28. David A. GreeneFeb 21, 2012

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.