Git稀疏签出忽略错误的目录

时间:2018-10-17 04:14:39

标签: git git-sparse-checkout

我的git仓库中有一个目录名“ [afdsklj]”。似乎git sparse checkout在尝试创建新目录时仍然给我致命错误无效参数。有什么办法让git完全排除这个坏目录吗?

1 个答案:

答案 0 :(得分:0)

首先检查是否可以在git sparse-checkout定义中转义那些字符:

node('jenkins-jenkins-slave') {

    stage('Parallel jobs') {
        parallel 
        stage('Preparing server for acceptance test') {
            script {

                def propertiesString = ''
                def jvmOptions = ''

                def properties = readProperties file: "${propertiesFile}".toString()
                properties.each { k, v ->
                    propertiesString = propertiesString + "-D${k}=${v} ".toString()
                }

                sh "java ${jvmOptions} -Dloader.path=${loaderPath} ${propertiesString}-jar ${jarFile} --spring.profiles.active=${activeProfiles}"
            }
        },
        stage('Acceptance tests') {
            script {
                def scriptName = 'wait_until_env_ready.sh'
                def exists = fileExists "$scriptName"
                if(!exists) {
                    def scriptContent = libraryResource "${scriptName}"
                    writeFile file: "${scriptName}", text: scriptContent
                    sh "chmod +x ${scriptName}"
                }
                sh "./wait_until_env_ready.sh http://localhost:8090/manage/health"
                sh "mvn -B test -Dmaven.repo.local=/root/.m2/repository -DskipTests=true -DskipITs=false"
                // How to signal the above stage to shut down the jar execution?
            }
        }       
    }
}

如果没有,as in here,请尝试添加通配符:

 \[afdsklj\]