forked from qt-creator/qt-creator
Git: Suggest branch name based on the commit subject
... when the checked out commit is not a remote branch. Fixes: QTCREATORBUG-24006 Change-Id: I175a3aedba88bd9e3b5cf298c5c161c56e9d0acd Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
5299e58cea
commit
14e3a379c1
@@ -320,10 +320,11 @@ bool BranchView::add()
|
||||
const QStringList localNames = m_model->localBranchNames();
|
||||
|
||||
BranchAddDialog branchAddDialog(localNames, BranchAddDialog::Type::AddBranch, this);
|
||||
if (isTracked) {
|
||||
const QString suggestedName = GitClient::suggestedLocalBranchName(localNames, trackedBranch);
|
||||
branchAddDialog.setBranchName(suggestedName);
|
||||
}
|
||||
|
||||
const QString suggestedName = GitClient::suggestedLocalBranchName(
|
||||
m_repository, localNames, trackedBranch,
|
||||
isTracked ? GitClient::BranchTargetType::Remote : GitClient::BranchTargetType::Commit);
|
||||
branchAddDialog.setBranchName(suggestedName);
|
||||
branchAddDialog.setTrackedBranchName(isTracked ? trackedBranch : QString(), !isLocal);
|
||||
branchAddDialog.setCheckoutVisible(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user