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

Re: Subtree in Git

From
HRHerman van Rink <rink@initfour.nl>
Date
May 7, 2012, 19:50 UTC
Message-ID
<4FA82799.1020400@initfour.nl>
In-Reply-To
<7v8vh78dag.fsf@alter.siamese.dyndns.org>
On 05/05/2012 06:25 AM, Junio C Hamano wrote:
Show 39 quoted lines
> greened@obbligato.org writes:
>
>>> I basically did a: git subtree merge --prefix=contrib/subtree <my
>>> git-subtree branch>
>>>
>>> The work in progress in on: https://github.com/helmo/git (the
>>> subtree-updates branch)
>> This branch seems to have a bunch of commits from master or some other
>> branch:
> Isn't the confusing shape of the history a direct result of what Herman
> said he did above, i.e. use of "subtree merge"?  I thought that we agreed
> not to do any more subtree merges for further updates when we slurped the
> subtree history to contrib/ early in this cycle, so if that is the case,
> Herman needs to rebase his work so that the integration will not need any
> "subtree merge" into git.git, perhaps?
>
> I looked at various branches found with ls-remote in that repository but I
> couldn't quite tell which is what, with too many cross merges, among which
> there are unnecessary duplicated commits (e.g. 90275824 and b9a745f7 seems
> to be two equivalent commits) and questionable changes from the overall
> project's point of view.
>
> For example, it renames git-subtree.txt to README.md at a4416ee; while I
> find the idea of departing from asciidoc somewhat attractive (perhaps this
> is only because I haven't been burned by markdown yet), if "git subtree"
> wants to live in the git.git repository, that change is a regression.
> Later the file is renamed back to git-subtree.txt (README.md is lost) at
> 9ffdeb, a commit with a single-liner "fixing typo" log message adds the
> README.md file with full contents of git-subtree.txt again at d9ccd03b,
> and then later merge of the branch at 8861de28 finally decides to revert
> that to have a shorter README.md that the history originally had, or
> something.  In short, it is a mess.
>
> Not very impressed, but I have this suspition that the history I was
> looking at was not what was meant to be sent to me and an older
> incarnation of the project before Herman cleaned it up for public
> consumption, or something.
>
> Confused...

I agree that it's a messy history. It the result of the many painful merges I did. In various stages a conflicting indentation and other changes made it painful to get a clean merge. In an attempt to get through this in a pragmatic way the history has taken some damage.

Before starting this latest subtree merge I actually tried to rebase. However this failed very quickly, on the I think third commit out of 60, landing me in conflict resolution as I had already been through. I'd love to improve git but this was just taking too mush effort. When I saw the quick result from subtree merge that seemed like a good thing.

Wouldn't a good rebase have almost just as messy a history as the subtree merge?

As an alternative I've now applied a patch with all changes on a clean master branch. In the commit message I've named all committers from the original history. Would that be acceptable? Its now available as https://github.com/helmo/git/tree/subtree-updates The subtree merge version is still available as https://github.com/helmo/git/tree/subtree-updates-merged

-- 
Met vriendelijke groet / Regards,

Herman van Rink
Initfour websolutions
Previous: dag@cray.comNext: dag@cray.com
Message 9 of 35 in “Subtree in Git”
  1. Hilco WijbengaApr 27, 2012
  2. dag@cray.comApr 27, 2012
  3. Hilco WijbengaApr 27, 2012
  4. Herman van RinkMay 1, 2012
  5. greened@obbligato.orgMay 4, 2012
  6. Herman van RinkMay 4, 2012
  7. Junio C HamanoMay 5, 2012
  8. dag@cray.comMay 7, 2012
  9. Herman van RinkMay 7, 2012
  10. dag@cray.comMay 7, 2012
  11. Junio C HamanoMay 11, 2012
  12. dag@cray.comMay 23, 2012
  13. greened@obbligato.orgJun 12, 2012
  14. Herman van RinkJun 13, 2012
  15. dag@cray.comJul 11, 2012
  16. Herman van RinkOct 20, 2012
  17. Junio C HamanoOct 21, 2012
  18. Herman van RinkOct 21, 2012
  19. Junio C HamanoOct 21, 2012
  20. Herman van RinkOct 21, 2012
  21. dag@cray.comOct 22, 2012
  22. dag@cray.comOct 22, 2012
  23. dag@cray.comOct 22, 2012
  24. Herman van RinkOct 26, 2012
  25. David Michael BarrOct 26, 2012
  26. James NylenOct 26, 2012
  27. dag@cray.comOct 29, 2012
  28. KindjalMar 1, 2013
  29. Paul CampbellMar 1, 2013
  30. David Michael BarrMar 2, 2013
  31. Paul CampbellMar 2, 2013
  32. Paul CampbellMar 4, 2013
  33. dag@cray.comOct 29, 2012
  34. Daniel KoesterMay 4, 2012
  35. greened@obbligato.orgJun 12, 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.