# Server side merges and rebases (& new rebase/cherry-pick UI?) (Elijah)
- Elijah: tried to implement the git side of the cherry pick as flags to
git merge subcommand, but everything turned out to be incompatible.
Used git merge-tree instead, much better, but this doesn't create a
new commit, only a new top-level tree.
- Rebase and cherry-pick is even more tricky because we need sequences
of commits. Does the current UI make sense?
- I want to create commits on a not-checked out branch, or rebase, or
cherry-pick. Not only on the server, but on any client.
- Rebase skips cherry-picks, but that is probably just an optimization
for when rebase for a shell script. Always doing cherry-picks is
faster these days, but is a behavior change
- Creating a new commit and modifying the working tree - this lets hooks
run, but I don't want them to run the server
- Rebase and cherry-pick are typically centered around HEAD, I would
prefer to replace with just a commit range. If you don't make the
assumption around HEAD, cherry-pick and rebase aren't that different.
- How do we display conflicts generated on the server side so that ? We
don't have a representation for that. Taylor: Probably just block the
operation on the server. Elijah: That's my intuition too.
- We have a lot of users who want to cherry-pick a commit on a bunch of
LTS branches, it would be great if they don't have to check out those
branches.
- What about cherry-picking to older branches? It's super slow to check
out the old branch and it's a big pain to update.
- Want to be able to replay merges. Not just like rebase
--rebase-merges, but with extra content/resolutions
- Emily: Rebase has famously bad UX. Could we create a new command
that fixes the problems, like checkout and switch? Elijah: I'm worried
that I'll copy the old terminology, so I'd need feedback on that.
- Stolee: We could rework the underlying API that supports rebase and
cherry-pick and use that for the new UX.
- Jrnieder: We don't have plumbing commands for this yet, which would
be very nice to have. For changes motivated by "cherry-pick has
this bad behavior", if we're not making an overall better UX then
I'd encourage "go ahead and make cherry-pick no longer have that
bad behavior"
- Jonathantanmy: I think base + theirs + ours is good enough. Elijah:
Sounds like git merge-tree, I don't think that's enough for the
server case. I'm sometimes porting over multiple commits instead of
just one, ort can do some optimizations on that, but one-by-one
invocations would lose that info. Also, this isn't enough to replay
merges.
- Peff: It would be good to have a machine-readable representation of a
conflict that the server can serve, but also can be materialized by
client tools. Taylor: It would be even cooler if we could push that
representation and have "collaborative" merge resolution. Elijah:
Merge-tree can output files with conflict markers. We'd have to add
info to represent the index conflict. With rebase, we'd need to
represent different conflicts at different points.
- Martin: Does ort handle conflicts with renames? E.g. renaming two
files to the same name. Elijah: Yes
- Elijah: One format would be input to git update-ref --stdin, so
instead of making all of changes, you could output the data that git
update-refs can ingest later.
- Waleed: Do you support rebasing non-linear sequences? Elijah: Yes,
but.. (didn't hear)