This commit is contained in:
Tilman Kamp 2018-05-23 17:32:02 +02:00
Родитель 837a64da82
Коммит b06b1ffca1
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -11,6 +11,9 @@ const USER_FILE = '.pituser.txt'
const CONNECT_FILE = '.pitconnect.txt'
const REQUEST_FILE = '.pitrequest.txt'
const githubGitPrefix = 'git@github.com:'
const githubHttpsPrefix = 'https://github.com/'
function fail(message) {
console.error('Command failed: ' + message)
process.exit(1)
@ -706,6 +709,9 @@ program
var branch = ob[1]
var hash = runCommand('git', 'rev-parse', tracking)
var originUrl = runCommand('git', 'remote', 'get-url', origin)
if (originUrl.startsWith(githubGitPrefix)) {
originUrl = githubHttpsPrefix + originUrl.substr(githubGitPrefix.length)
}
var diff = runCommand('git', 'diff', '--no-prefix', tracking)
if (!clusterRequest && fs.existsSync(REQUEST_FILE)) {
clusterRequest = fs.readFileSync(REQUEST_FILE, 'utf-8').trim()