summaryrefslogtreecommitdiff
path: root/xnt/vcs/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'xnt/vcs/git.py')
-rw-r--r--xnt/vcs/git.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/xnt/vcs/git.py b/xnt/vcs/git.py
index 7c4857d..00e2828 100644
--- a/xnt/vcs/git.py
+++ b/xnt/vcs/git.py
@@ -22,13 +22,23 @@ import xnt.tasks
import xnt.vcs
def gitclone(url, dest=None, branch=None):
- """Clone a repository"""
+ """Clone a repository
+
+ :param url: URI of the repository to clone
+ :param dest: Destination directory or name of the cloned repository
+ :param branch: Branch to clone
+ """
command = ["git", "clone"]
command = xnt.vcs.clone_options(command, url, branch, dest)
xnt.tasks.call(command)
def gitpull(path, source="origin", branch="master"):
- """Pull/Update a cloned repository"""
+ """Pull/Update a cloned repository
+
+ :param path: Directory of the repository for which to pull and update
+ :param source: Repository's upstream source
+ :param branch: Repository's upstream branch to pull from
+ """
cwd = os.getcwd()
os.chdir(path)
command = ["git", "pull", source, branch]