Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always show specific branch/bookmark #959

Open
EntilZha opened this issue Oct 3, 2024 · 4 comments
Open

Always show specific branch/bookmark #959

EntilZha opened this issue Oct 3, 2024 · 4 comments

Comments

@EntilZha
Copy link

EntilZha commented Oct 3, 2024

Is there a way to always display a branch/bookmark when running sl? In my case, we have:

  • Repository with main
  • A small number of long running branches that may or may not get merged into main. Maybe call one of this dev-a
  • Our workflow is to treat dev-a as effectively our main branch to merge against.
  • Every so often, we rebase/merge dev-a onto main.

I've noticed that if I am working on a change so that there is a chain: dev-a -> changes (so dev-a points to an ancestor of my current changes), but then I run sl pull -B dev-a such that it now points to a more recent commit (i.e., not an ancestor of my current commits), that smartlog will now only show main + my stack of commits, but not show where dev-a points to. It would be great to have a way to mark certain branches/bookmarks as ones to always show, similar to main/master.

I'd also be curious if there is a way to use sl pr to submit PRs against non-main branches.

@lucidNTR
Copy link

same issue, this would be a huge improvement. also the integration with isl would be important. the bookmark manager also constantly hides relevant publicheads branches if they get out of scope for any open stacks

@sggutier
Copy link
Contributor

Partially copying my response from inner communication channels:

You can give it a try by doing something like

sl --config smartlog.names="$(sl config smartlog.names) dev-a"`

To permanently change the values, you can run sl config --local to edit the config for the repo by opening your text editor. Alternatively, you can set its value by running something like

sl config --local smartlog.names="$(sl config smartlog.names) dev-a"

smartlog.names controls the bookmarks shown in the smartlog (and ISL) while remotenames.selectivepulldefault changes the branches that are automatically pulled.

@sggutier
Copy link
Contributor

Leaving this open until we make the configs easily discoverable or easier to change

@lucidNTR
Copy link

lucidNTR commented Oct 31, 2024

@sggutier thanks! thats exactly what i was looking for, just notice that i think it should be

sl config --local smartlog.names="$(sl config smartlog.names),<my branch a>,<my branch b>"

as the names look like they are comma separated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants