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

show branch name with tree name #18

Closed
shiqicao opened this issue Mar 17, 2023 · 2 comments
Closed

show branch name with tree name #18

shiqicao opened this issue Mar 17, 2023 · 2 comments

Comments

@shiqicao
Copy link

I feel it's convenient to have branch name along with tree name, but maybe it's expensive to call for each branch.

@davvid
Copy link
Member

davvid commented May 2, 2023

It might be a little expensive. Luckily this feature is really easy to add as a custom command.

commands:
  show-branch: |
    echo -n "# ${TREE_NAME} "
    git symbolic-ref --short HEAD

Adding that allows you to run:

garden -q show-branch <tree-query>

A few questions -- we can see whether others have any opinions on these.

  • Should this be enabled by default, or should it be opt-in?

  • If it's opt-in ~ should this be a setting that gets configured via garden.yaml to enable it?

  • Assuming the repo is called "repo" and the branch is called "dev", what should the output look like?

  • One of these three, or something else?

# repo (dev)
# repo [dev]
# repo :: dev

The current output is just # repo and if you use garden -v (aka --verbose) the output contains # repo /path/to/repo.

@davvid davvid closed this as completed in 5a54973 Dec 4, 2023
@davvid
Copy link
Member

davvid commented Dec 4, 2023

This has been implemented. # tree-name (branch) is what's displayed now.

Thanks for the sug!

https://garden-rs.gitlab.io/configuration.html#tree-display

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

2 participants