Commit 854c1769 authored by Sven Strickroth's avatar Sven Strickroth

Allow to resolve conflict if at least on conflict file is staged in index

Signed-off-by: Sven Strickroth's avatarSven Strickroth <email@cs-ware.de>
parent 87e54f60
......@@ -774,7 +774,7 @@ LRESULT CMainWindow::DoCommand(int id, LPARAM lParam)
CStringA subpath = CUnicodeUtils::GetUTF8(selectionResult.c_str()).Mid((int)strlen(git_repository_workdir(repository)));
CAutoIndex index;
if (git_repository_index(index.GetPointer(), repository) || git_index_get_bypath(index, subpath, 1) == nullptr)
if (git_repository_index(index.GetPointer(), repository) || (git_index_get_bypath(index, subpath, 1) == nullptr && git_index_get_bypath(index, subpath, 2) == nullptr))
{
PostQuitMessage(resolveWith);
break;
......
// TortoiseGitMerge - a Diff/Patch program
// Copyright (C) 2008-2016 - TortoiseGit
// Copyright (C) 2008-2017 - TortoiseGit
// Copyright (C) 2004-2015 - TortoiseSVN
// Copyright (C) 2012-2014 - Sven Strickroth <email@cs-ware.de>
......@@ -1652,8 +1652,7 @@ bool CMainFrame::FileSave(bool bCheckResolved /*=true*/)
break;
CStringA path = CUnicodeUtils::GetMulti(subpath, CP_UTF8);
const git_index_entry * entry = git_index_get_bypath(index, path, 1);
hasConflictInIndex = entry != nullptr;
hasConflictInIndex = git_index_get_bypath(index, path, 1) || git_index_get_bypath(index, path, 2);
} while(0);
if (hasConflictInIndex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment