GitFunction
class GitFunction
Properties
protected | $repoId | ||
protected | $basePath | ||
protected | $scriptPath |
Methods
GitFunction constructor.
getStatus: get git status
doAdd: do git add
addGitHooks: add the githooks folder
doAddFile: git add specific file
isUntracked: check if there are untracked files present
isTracked: check if there are tracked files present
hasDiff: git diff
fileHasDiff: git check if specific file has diff
fileExists
isAdded: check if there are git added files
isModified: git check if there modified, not staged files present
isModifiedAndAdded: git check if there modified, staged files present
isCommitted: git check if something is committed
isReadyForPush: git check if there are elements to be pushed
isCleanWorkingTree: git check if all is committed and pushed
getLogMessage: git fetch commit log by number
addUntracked: git add untracked files
addModified: git add modified files
commitFiles: git commit files
commitFile: git commit specific file
setCorpusVersionTag: git set version tag
isTagged: git check if tagged by given version
addRemote: git add remote repository
initialPush: git push initial corpusstructure
resetAdd: git reset added files from the staging
pushFiles: git push files
No description
addFileUpdate: git add modified files
initiateRepository: git init
copyGitHooks: copy the githooks folder to the corpus
setGitConfig
setCoreHooksPath: set path of the githooks folder in git config
No description
copyScripts: copy the pipeline python scripts to the corpus
writeFiles: write uploaded files to the corpus
makeDirectory: unix mkdir
renameFile: unix mv
deleteFiles
No description
deleteUntrackedDataFiles: delete corpus data files that are not git staged
deleteUntrackedFiles: delete corpusheader files not git staged
getCommitData: git show
isDottedFile: determine if we have a .dotfile
getListOfStagedFiles: git status --porcelain
No description
checkForCorpusFiles: execute validateHeaders.py to check if the corpus has all files present
Details
at line 30
__construct()
GitFunction constructor.
at line 44
string
getStatus($path)
getStatus: get git status
at line 63
string
doAdd($path)
doAdd: do git add
at line 94
bool
addGitHooks($path, $user, $email)
addGitHooks: add the githooks folder
at line 121
string
doAddFile($file, $path)
doAddFile: git add specific file
at line 141
bool
isUntracked($status)
isUntracked: check if there are untracked files present
at line 153
bool
isTracked($path)
isTracked: check if there are tracked files present
at line 183
string|null
hasDiff($path)
hasDiff: git diff
at line 213
bool
fileHasDiff($path, $file)
fileHasDiff: git check if specific file has diff
at line 241
bool
fileExists($path)
fileExists
at line 252
bool
isAdded($status)
isAdded: check if there are git added files
at line 264
bool
isModified($status)
isModified: git check if there modified, not staged files present
at line 276
bool
isModifiedAndAdded($status)
isModifiedAndAdded: git check if there modified, staged files present
at line 289
bool
isCommitted($commitmessage, $logmessage)
isCommitted: git check if something is committed
at line 301
bool
isReadyForPush($status)
isReadyForPush: git check if there are elements to be pushed
at line 313
bool
isCleanWorkingTree($status)
isCleanWorkingTree: git check if all is committed and pushed
at line 326
string
getLogMessage($nummer, $path)
getLogMessage: git fetch commit log by number
at line 350
bool
addUntracked($pathWithOutAddedFolder, string $folder = "")
addUntracked: git add untracked files
at line 390
bool
addModified($pathWithOutAddedFolder, string $folder = "")
addModified: git add modified files
at line 419
bool
commitFiles($path, $commitmessage, $user, $email)
commitFiles: git commit files
at line 455
bool
commitFile($path, $file, $commitmessage, $user, $email)
commitFile: git commit specific file
at line 502
bool
setCorpusVersionTag($corpusPath, $tagmessage, $version, $user, $email, $blame)
setCorpusVersionTag: git set version tag
at line 548
bool
isTagged($version, $corpusPath)
isTagged: git check if tagged by given version
at line 577
bool
addRemote($origin, $path)
addRemote: git add remote repository
at line 631
bool
initialPush($path, $user)
initialPush: git push initial corpusstructure
at line 672
bool
resetAdd($path, $files)
resetAdd: git reset added files from the staging
at line 708
bool
pushFiles($path, $corpusid)
pushFiles: git push files
at line 731
pushFiles2($path, $corpusid)
at line 757
bool
addFileUpdate($path, $file)
addFileUpdate: git add modified files
at line 779
bool
initiateRepository($path)
initiateRepository: git init
at line 809
bool
copyGitHooks($path)
copyGitHooks: copy the githooks folder to the corpus
at line 837
array
setGitConfig($path, $configs)
setGitConfig
at line 862
bool
setCoreHooksPath($path)
setCoreHooksPath: set path of the githooks folder in git config
at line 882
static
__callStatic($name, $arguments)
at line 895
bool
copyScripts($path)
copyScripts: copy the pipeline python scripts to the corpus
at line 930
array
writeFiles($dirPath, $fileDataArray, $flySystem, $fileTempPath, $theFilePath)
writeFiles: write uploaded files to the corpus
at line 1029
string
makeDirectory($path, $directory)
makeDirectory: unix mkdir
at line 1052
string
renameFile($path, $oldname, $newname)
renameFile: unix mv
at line 1075
bool
deleteFiles($path, $user, $email)
deleteFiles
at line 1145
deleteCorpusFiles($path, $user, $email)
at line 1197
bool
deleteUntrackedDataFiles($path)
deleteUntrackedDataFiles: delete corpus data files that are not git staged
at line 1247
bool
deleteUntrackedFiles($path, bool $isProject = false, bool $isCorpus = false)
deleteUntrackedFiles: delete corpusheader files not git staged
at line 1339
array
getCommitData($path)
getCommitData: git show
at line 1380
bool
isDottedFile($file)
isDottedFile: determine if we have a .dotfile
at line 1393
array
getListOfStagedFiles($path)
getListOfStagedFiles: git status --porcelain
at line 1410
getListOfStagedFiles2($path)
at line 1435
string|null
checkForCorpusFiles($path)
checkForCorpusFiles: execute validateHeaders.py to check if the corpus has all files present