Closed shiqicao closed 8 months ago
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
.
This has been implemented. # tree-name (branch)
is what's displayed now.
Thanks for the sug!
I feel it's convenient to have branch name along with tree name, but maybe it's expensive to call for each branch.