Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover pre-merged histories from repositories "git subtree add" has … #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dxops
Copy link

@dxops dxops commented Dec 29, 2016

…added to the monorepo.

Hope to see this feature in master

@fabpot
Copy link
Contributor

fabpot commented Jan 3, 2017

This would close #15 and #23, right?

@mhumeSF
Copy link

mhumeSF commented Feb 8, 2017

@fabpot Looks so

@mmunro-ltrr
Copy link

I've been asleep through the course of the pull request, dreaming that someone had come up with a replacement for our workaround, & just noticed that the code was from https://github.com/ltrr-arizona-edu/lite/tree/UADIGITAL-739 & not from anywhere else! I don't know of any problems, but perhaps should scramble around to provide some test coverage at least.

@Spea
Copy link

Spea commented Apr 27, 2017

Is there anything I can do, to get this merged? Currently I can not use this awesome tool, as this feature is missing :(

@dxops
Copy link
Author

dxops commented Apr 27, 2017

@Spea make sure it works as expected - no missing commits, history is ok

@Spea
Copy link

Spea commented Apr 28, 2017

Tested it with one of our SDKs and compared it with a normal subtree split

Here are my results:

Original single repository

Number of commits: 2304
Last 3 commit hashes:

  • a6efa2d0
  • c03875cf
  • a5993fc7

Subtree split in mono repository

Command: git subtree split --prefix sdk
Number of commits: 2304
Last 3 commit hashes:

  • a6efa2d0
  • c03875cf
  • a5993fc7

Splitsh/lite in monorepository

Command: go run main.go --path=../mono --prefix=sdk --debug --scratch --progress
Number of commits: 1804
Last 3 commit hashes:

  • 5a8972a40
  • 189d36b44
  • a082fb70f

Conclusion

As you can see, the number of commits + hashes differ from the git subtree split command and the original single repo. After taking a closer look at the commits, it looks like all of the "Merge pull request" commits (from github) are gone when using splitsh-lite.

Now the big question: Is this expected behaviour? I thought it would produce the same result as a git subtree split

@dxops
Copy link
Author

dxops commented Apr 28, 2017

Different hashes are expected, the most case is that you hashes were created using different git version but splitsh uses only one strategy (latest git by default). I think you should run tests and compare files to make sure everything is ok.

@mmunro-ltrr
Copy link

I had worries about the hashes differing, but the ultimate reference for a monorepo to manyrepo split must be Symfony, and there you can also see differences. I've not yet delivered on the promised updates to the tests (to cover the changes in this pull request), but we're starting to use a Dockerized version with the changes applied already, if anyone is interested: https://hub.docker.com/r/uadrupal/schismatic/

@dxops
Copy link
Author

dxops commented Feb 28, 2018

Looks like git subtree has the same issue with merge commits
git/git@dd65a9e#diff-59f70cbe935ec223e3df413b94cab740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants