Indefero

Indefero Commit Details


Date:2011-05-26 02:56:04 (13 years 6 months ago)
Author:William MARTIN
Branch:develop, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.1, release-1.2, release-1.3
Commit:94da55d15efb24a36540420273d213a9767d3e67
Parents: bbf1a1882a676486837abb2d7496b0443a969233
Message:Fix tags extraction from git repository (issue 675)

Changes:

File differences

src/IDF/Scm/Git.php
209209
210210
211211
212
212
213213
214214
215215
......
221221
222222
223223
224
225
226
227
228
229
230
224
225
226
231227
232228
229
233230
234231
235232
return $this->cache['tags'];
}
$cmd = Pluf::f('idf_exec_cmd_prefix', '')
.sprintf('GIT_DIR=%s %s for-each-ref --format="%%(taggerdate:iso)%%(committerdate:iso) %%(objectname) %%(refname)" refs/tags',
.sprintf('GIT_DIR=%s %s for-each-ref --format="%%(objectname) %%(refname)" refs/tags',
escapeshellarg($this->repo),
Pluf::f('git_path', 'git'));
self::exec('IDF_Scm_Git::getTags', $cmd, $out, $return);
rsort($out);
$res = array();
foreach ($out as $b) {
$elts = explode(' ', $b, 5);
$tag = substr(trim($elts[4]), 10);
if (false !== strpos($tag, '/')) {
$res[$elts[3]] = $b;
} else {
$res[$tag] = '';
}
$elts = explode(' ', $b, 2);
$tag = substr(trim($elts[1]), 10); // Remove refs/tags/ prefix
$res[$tag] = '';
}
$this->cache['tags'] = $res;
return $res;
}

Archive Download the corresponding diff file

Page rendered in 0.08127s using 14 queries.