Skip to main content

module util::git::Git

rascal-0.34.0
rascal-git-0.1.14

Access functions to git features via JGit

Usage

import util::git::Git;

Source code

http://github.com/cwi-swat/rascal-git/src/main/rascal/util/git/Git.rsc

Description

This library is a growing collection of functions that enable Rascal programmers to interact with the git version management system.

function cloneRemoteRepository

git clone

void cloneRemoteRepository(str remotePath, loc localPath)

This has the effect git clone, and it registers this repository with rascal-git for further processing.

function openLocalRepository

void openLocalRepository(loc localPath)

This registers an existing clone with rascal-git for further processing.

function getTags

git tag --list

list[str] getTags(loc repoPath)

function switchToTag

git checkout myTagName

void switchToTag(loc repoPath, str \tag)

function getTagCommitDate

git log -1 --format=%ai myTagName

datetime getTagCommitDate(loc repoPath, str \tag)