This message was deleted.
# how-do-i
s
This message was deleted.
l
I would perform the rename in each of the three PRs, and then restack - graphite’s resolution usually handles the clashes.
g
There are no Git conflicts (is that what you mean by clash?) All of these changes are in different files.
The question is how to we maintain the triviality of the operation: fundamentally a find-and-replace. If there was just one big PR (
main
<-
PR123
), the author would just do a find-and-replace and be good to go. Because of the stacking, this operation is now more burdensome. I am hoping there is a way to reduce the burden.
brainstorming, and forgetting about Graphite but just thinking about Git: the situation is like I have a Git history like
main
<-
C1
<-
C2
<-
C3
and then I do a find-and-replace. I could commit the modifications due to the find-and-replace separately and get at the situation:
main
<-
C1
<-
C2
<-
C3
<-
R1
<-
R2
<-
R3
and now I want to re-order the commits automatically so that they can be in the appropriate parts of the stack.
More brainstorming. You have
main
<-
C1
<-
C2
<-
C3
and you turn it into (
main
<-
C123
, the_structure_you_lost) Then you do the trivial find-and-replace (
main
<-
C123_fixed
, the_structure_you_lost) and you'd like to turn that into
main
<-
C1_fixed
<-
C2_fixed
<-
C3_fixed
z
Also normally I would just open a new PR on top of
PR3
for the renaming operation, which might be good enough depending on the engineering process
(I am also thinking about other more advanced ways to support refactoring PRs better, might take a long time for those to become reality though)
g
Opening a new PR sounds pretty good, but then that means you're addressing a review comment in
PR1
within
PR4
.
I will have to look at
git absorb
!
z
that means you’re addressing a review comment in
PR1
within
PR4
Yeah that does need other people to but into this workflow, and if the fix is semantically meaningful it also doesn’t work 🙂 It is simple when it works though. Let me know if you find
git absorb
interesting! I think @Jacob Gold is thinking about bringing it into Graphite.
j
This is on our roadmap for Q4 :)
➕ 2
🙏 2
💯 2
g
@Jacob Gold very exciting!
a
This is on our roadmap for Q4 🙂
This is fantastic.
absorb
is the killer feature for stacked diffs IME. I joined the slack just to see if it’s on the roadmap. v. excited for this feature. Best of luck, with your work @Jacob Gold! As Gregory Szorc (mozilla / mercurial dev) wrote on his blog about
absorb
:
Every so often a tool you use introduces a feature that is so useful that you can’t imagine how things were before that feature existed.
I couldn’t agree more