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

What does commit history look like? #21

Open
FFdhorkin opened this issue Mar 17, 2020 · 1 comment
Open

What does commit history look like? #21

FFdhorkin opened this issue Mar 17, 2020 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@FFdhorkin
Copy link

You mentioned two design goals that really appeal to me, over regular git-subrepo:

  • Keep as much history as reasonably possible, both when pushing and pulling. In particular, do not squash history when pulling subrepo changes back into the main repo
  • Have nicer generated commit messages

Sounds like what you're working on might make people in this issue happy: ingydotnet/git-subrepo#246

Do you have any additional details (or example commit messages) showing what your version is doing (or will do) differently on that end?

My personal goal (as mentioned in my comment on the above link) would be something that looks like a merge commit from an orphaned branch:
image
image

@mvz
Copy link
Owner

mvz commented Mar 23, 2020

One goal of this project is indeed to avoid squashing the entire history of the upstream repo during pulls, and perhaps even during clones.

However, the goal for the resulting history is more like that of git-subrepo, so all commits in the main repo ultimately have the same root.

See for example this scenario showing the histories in both the main repo and the upstream repo:

Scenario: Pushing older commits after pulling
Given I have a git project with a subrepo with a remote
And I have initialized and pushed the subrepo
When I add a new commit to the remote
And I add a new commit to the subrepo
And I pull the subrepo without squashing
And I push the subrepo "bar"
Then the subrepo and the remote should have the same contents
And the remote's log should equal:
"""
* Subrepo-merge bar/master into master
|\
| * Add another_file in remote baz
* | Add more stuff in subrepo bar
|/
* Add stuff in subdir bar
"""
And the project's log should equal:
"""
* Push subrepo bar
* Subrepo-merge bar/master into master
|\
| * Add another_file in remote baz
* | Add more stuff in subrepo bar
|/
* Push subrepo bar
* Initialize subrepo bar
* Add stuff in subdir bar
* Initial commit
"""

@mvz mvz changed the title what does commit history look like? What does commit history look like? Mar 31, 2020
@mvz mvz added the documentation Improvements or additions to documentation label Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants