kubernetes/api

Preserving the history

caesarxuchao opened this issue · 7 comments

I've been playing with git filter-branch commands to preserve the history of k8s.io/kubernetes/pkg/api and k8s.io/kubernetes/pkg/apis, the result is https://github.com/caesarxuchao/api.

It has ~4000 commits (~half of them are merge commits) that touched pkg/api and pkg/apis. If you run git log --follow core/v1/types.go from HEAD, it will show you all the commits that changed pkg/api/v1/types.go, and the commit where i moved pkg/api/v1/types.go to core/v1/types.go. I think in terms of "preserving commit history", it's good enough.

I also append Kubernetes-commit: xxx to the commit messages so people can find the original commit in k8s.io/kubernetes.

Please let me know if you have other concerns.

If no one objects, i'll push the commits to the master branch of k8s.io/api.

@lavalamp @justinsb @bgrant0607 @kubernetes/sig-api-machinery-misc

cc @deads2k @sttts you might also be interested?

Tried it. That would cause conflicts. I think it's merge is somehow different from cherry-picks.

I have done something similar and didn't have that problem, strange. I see there are actually code changes in the merge commits, which I didn't expect.

But this seems to be fine for preserving history.

Thanks for the confirmation.

This LGTM - thank you @caesarxuchao

Thanks for confirmation. The master branch is updated with the history.