|
|
|
|
|
by sanderjd
1066 days ago
|
|
I can't edit anymore, but hopefully people can read my comment with s/commits have exactly one parent/non-merge commits have exactly one parent/ :) But this did make me realize that the problem with this workflow isn't the "one parent" part at all, it's really just the "immutable parent" part. But to the main thrust of your comment: Yes, this "porcelain" is what I meant by my surprise that there aren't better tools for this. I think the reason there aren't is that it is really hard to do this well with porcelain, because of requiring a bundle of modifications to the commit tree, where there is no good way to make the whole bundle atomic. So it works fine (and I have a script for it) in the happy path, but it becomes a bit of a nightmare if something doesn't apply quite right. And that's what I mean by this being unsupported at the data model level, that there is no way to do atomic operations on subtrees as a whole. |
|
You could just do all the commit manipulations you need to do, and only update the branches at the very end?
Updating the individual branch 'pointers' ain't atomic, but if there's nothing else going on in the repo at the time, it can't really fail; if you've already created the new commits.