mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Add example to git.latest_branch
This commit is contained in:
parent
979d548d3a
commit
15ceed965a
@ -114,6 +114,12 @@ def _check_git():
|
||||
def current_branch(cwd, user=None):
|
||||
'''
|
||||
Returns the current branch name, if on a branch.
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' git.current_branch /path/to/repo
|
||||
'''
|
||||
cmd = 'git branch --list | grep "^*\ " | cut -d " " -f 2 | ' + \
|
||||
'grep -v "(detached"'
|
||||
|
Loading…
Reference in New Issue
Block a user