From 15ceed965a5cca903df18156c74f4b246822eb4c Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 21 Sep 2013 11:11:51 +0100 Subject: [PATCH] Add example to `git.latest_branch` --- salt/modules/git.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/modules/git.py b/salt/modules/git.py index fd55182552..7f96d5ed94 100644 --- a/salt/modules/git.py +++ b/salt/modules/git.py @@ -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"'