File indexing completed on 2024-05-19 04:47:11
0001 #include "branchesmanager.h" 0002 0003 0004 BranchesManager::BranchesManager(QObject *parent) : QObject(parent) 0005 { 0006 0007 } 0008 0009 QStringList BranchesManager::allBranches() 0010 { 0011 QStringList res; 0012 0013 // if(m_repo.isValid()) 0014 // { 0015 // res = m_repo.allBranchNames(r); 0016 // } 0017 0018 return res; 0019 } 0020 0021 QStringList BranchesManager::localBranches() 0022 { 0023 QStringList res; 0024 // Git::Result r; 0025 0026 // if(m_repo.isValid()) 0027 // { 0028 // res = m_repo.branchNames(r, true, false); 0029 // } 0030 0031 return res; 0032 } 0033 0034 QStringList BranchesManager::remoteBranches() 0035 { 0036 QStringList res; 0037 // Git::Result r; 0038 0039 // if(m_repo.isValid()) 0040 // { 0041 // res = m_repo.branchNames(r, false, true); 0042 // } 0043 0044 return res; 0045 } 0046 0047 QString BranchesManager::upstreamRemote(const QString &branchName) 0048 { 0049 QString res; 0050 // Git::Result r; 0051 0052 // if(m_repo.isValid()) 0053 // { 0054 // auto branch = m_repo.branchRef(r, branchName); 0055 // if(r) 0056 // { 0057 // res = branch.upstreamRemoteName(r); 0058 // } 0059 // } 0060 return res; 0061 } 0062 0063 QString BranchesManager::upstream(const QString &branchName) 0064 { 0065 QString res; 0066 // Git::Result r; 0067 0068 // if(m_repo.isValid()) 0069 // { 0070 // auto branch = m_repo.branchRef(r, branchName); 0071 // if(r) 0072 // { 0073 // res = branch.upstreamName(r); 0074 // } 0075 // } 0076 return res; 0077 }