forked from qt-creator/qt-creator
Git: Always use commit hash in archive
Storing the archive as "Project-HEAD" or even "Project-master" is ambiguous. Better resolve the reference to to have unique archive identifiers. Change-Id: I1233c20e5975028d084d6587b4a0f47390d1fd17 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
31e9c93b6b
commit
acd1d6c438
@@ -1131,7 +1131,7 @@ void GitClient::show(const QString &source, const QString &id, const QString &na
|
||||
});
|
||||
}
|
||||
|
||||
void GitClient::archive(const QString &workingDirectory, const QString &commit)
|
||||
void GitClient::archive(const QString &workingDirectory, QString commit)
|
||||
{
|
||||
QString repoDirectory = VcsManager::findTopLevelForDirectory(workingDirectory);
|
||||
if (repoDirectory.isEmpty())
|
||||
@@ -1148,6 +1148,10 @@ void GitClient::archive(const QString &workingDirectory, const QString &commit)
|
||||
else
|
||||
selectedFilter = filters.key(".tar.gz");
|
||||
|
||||
QString output;
|
||||
if (synchronousRevParseCmd(repoDirectory, commit, &output))
|
||||
commit = output.trimmed();
|
||||
|
||||
QString archiveName = QFileDialog::getSaveFileName(
|
||||
ICore::dialogParent(),
|
||||
tr("Generate %1 archive").arg(repoName),
|
||||
|
Reference in New Issue
Block a user