def __printInformationImpl(filePath, targetString): mylist = [] today = __datetime.date.today() #append the Date into a list, so it can be printed mylist.append(today) #represents your git repository path repo = __Repo(filePath) print( 'Information about ' + targetString ) print( '============================================================' ) print( "Date: " + str(mylist[0]) ) print( 'Python Version: ' + __sys.version ) print( 'Git directory: ' + __findGitRepo(filePath) ) print( 'Current git SHA: ' + repo.commit().hexsha ) print( 'Current remote: ' + str( repo.remote() ) ) print( 'Current branch: ' + str(repo.active_branch) )
def __currentRemoteImpl(filePath): repo = __Repo(filePath) print( 'Current remote: ' + str( repo.remote() ) )
def __currentGitSHAImpl(filePath): repo = __Repo(filePath) print( 'Current git SHA: ' + repo.commit().hexsha )
def __currentBranchImpl(filePath): repo = __Repo(filePath) print( 'Current branch: ' + str(repo.active_branch) )