This message was deleted.
# feature-requests
s
This message was deleted.
e
This was my stack state when I tried to run
gt fold
on
ella/rm-dev
Copy code
◯ ella/for_each 
│ 
│ 
│
◯ ella/more-tf-monitors 
│ 8 minutes ago
│ 
│ PR #10484 (Draft) add more connector ops monitors 
│ <https://app.graphite.dev/github/pr/airbytehq/airbyte-platform-internal/10484>
│ Last submitted version: v3 (local changes, need submit)
│ 
│ 0ed4671f95 - add endpoints monitor
│ 4de8e886be - add new error monitor
│ ebf25bab73 - update oauth alerts to ping both oauth channel and ops channel
│
◉ ella/rm-dev (current) 
│ 
│ 
│
◯ master 
│ 74 minutes ago
│ 
│ 107cb1fb88 - add connector ops monitors (#10432)
│
d
would this be better?
Copy code
> gt fold
ERROR: The current branch (ella/rm-dev) is directly branched off your trunk branch (main).

Folding this branch directly into main is not possible.

If you don't need this branch anymore, you can run `gt delete ella/rm-dev`.
e
Interesting, it doesn't mention anything about it being empty. Did I have the wrong assumption about why it's not possible? FWIW I always assume fold goes upwards (I guess into the child). So I see why it would not be possible to add the commits to master.
d
now i'm second guessing (i rarely fold), but i thought it goes into the parent
e
In any case, this error message did make it much more clear what it was trying to do! 🙂 I thought that I was trying to fold
ella/rm-dev
into
ella/more-tf-monitors
(oops), so I was confused why it was talking about the trunk branch - hence why I thought it had to do pointers
Nah you're totally right
I even read the help on it because I screw it up every time, and still got it wrong lol
d
would a diagram in
gt fold --help
and/or an example help?
i don't find the
--help
page that clear, if i'm glancing at it with a new user's eyes
e
I think its mostly me confusing parent/child a lot, since the
gt log short
shows a tree that in my brain looks like the top branches are parents of the lower ones (because of family trees, i guess)?
d
ah gotcha, i think the key is that everything is sprouting up from
main
like a plant growing up from the ground
e
I imagine a lot of users probably don't want confirmation on fold by default? But even just a "Fold <branch> into <parent>?" confirmation would be great for me
yeah it definitely looks more family-tree esque if you either only have one stack or like to do
gt log short -s
like me
(side note, i always try to do
--short
instead of short as an option lol)
took me going back again to help to figure out how to pass the short option
d
you can
gt ls
too
e
omg bless you
d
gt ls -s
e
that will be much easier to remember haha
d
this is opaque behavior, but most commands collapse to 1 or 2 letters
gt modify
==
gt m
e
and now i'm feeling amazed by the fact that i didn't know what
ls
and
ll
stood for
yeah i don't mind the longer commands, but
ls
is familiar in a way that
m
isn't
d
yeah it happens to make sense as
ls
heh
you're… listing… your stacks…?
e
pretty much!
d
https://graphite-community.slack.com/archives/C02DRNZELUU/p1703046929224779?thread_ts=1703041762.443269&amp;cid=C02DRNZELUU i might split the difference here and at least print that out as confirmation the main issue is i'm not sure if users have bash scripts that run
gt fold
, and i don't want to block the script on an interactive prompt
e
yeah so true! Definitely wouldn't ask to change the default, i think i just have to learn it
I think for folding the reason i sometimes want to "fold down" is that usually I semantically want to fold in the branch that doesn't need to be its own PR into the branch that encapsulates the gist of both of them. I.e. usually my branch names are in such a way that if i'm folding, i don't need to rename one of the branches, i can "fold" the changes i made in one into the other. Depending on which branch is the "real" one that will PR and which (parent or child) I'm trying to fold into it, I either want to fold up or down
Maybe if there were a
gt fold up
and a
gt fold down
or something
I was originally going to say
gt fold parent
and
gt fold child
but that would still confuse me, lol. and
up/down
would follow the same behavior of
gt up
where you can do it automatically with one child, or have to choose with multiple children
d
there is another option too… •
gt reorder
- move the branch you want to get rid of above the branch you want to keep •
gt checkout <branch you want to get rid of>
•
gt fold
reorder lets you move branches anywhere around the stack (caveat: beware of merge conflicts when changing up the ordering of things)
e
Yeah, that's how I got the branch below in the first place haha
It's not my ideal flow, I'd prefer a similar
gt create down
/`gt create up` (default up) type of workflow
I probably create,reorder once a day or more, whenever I run into something that should be fixed before whatever im working on
d
yeah, it's a question of increasing the complexity of arguments to every command, or leaning on composition of commands
e
makes sense 🙂
if reorder weren't interactive, I could alias those compositions myself
d
gt move
might not be interactive
now i'm stretching my knowledge here, but you might be able to
gt move
the branch to the right spot & then
fold
e
hmm true, i have to play around with it. I've had some issues with move and child branches, but theres probably an option i missed when doing it
👍 1
in any case, thanks for all the info and hearing me out!
🙏 1
d
following back up, i filed some enhancements to
gt fold
based on what we talked about here, so we should get to it at some point!
e
Thanks so much!