Ejemplo n.º 1
0
/**
 * Determine if the repository was a shallow clone.
 *
 * @param repo S4 class git_repository
 * @return TRUE if shallow else FALSE
 */
SEXP git2r_repository_is_shallow(SEXP repo)
{
    SEXP result;
    int is_shallow;
    git_repository *repository;

    repository= git2r_repository_open(repo);
    if (!repository)
        git2r_error(git2r_err_invalid_repository, __func__, NULL);

    is_shallow = git_repository_is_shallow(repository);
    git_repository_free(repository);
    if (is_shallow < 0)
        git2r_error(git2r_err_from_libgit2, __func__, giterr_last()->message);

    PROTECT(result = allocVector(LGLSXP, 1));
    if (1 == is_shallow)
        LOGICAL(result)[0] = 1;
    else
        LOGICAL(result)[0] = 0;
    UNPROTECT(1);

    return result;
}
Ejemplo n.º 2
0
BOOL CPullFetchDlg::OnInitDialog()
{
	CHorizontalResizableStandAloneDialog::OnInitDialog();
	CAppUtils::MarkWindowAsUnpinnable(m_hWnd);

	AddAnchor(IDC_REMOTE_COMBO, TOP_LEFT, TOP_RIGHT);
	AddAnchor(IDC_OTHER, TOP_LEFT,TOP_RIGHT);

	AddAnchor(IDC_REMOTE_BRANCH, TOP_LEFT,TOP_RIGHT);
	AddAnchor(IDC_BUTTON_BROWSE_REF,TOP_RIGHT);

	AddAnchor(IDOK,BOTTOM_RIGHT);
	AddAnchor(IDCANCEL,BOTTOM_RIGHT);
	AddAnchor(IDC_GROUPT_REMOTE,TOP_LEFT,TOP_RIGHT);
	AddAnchor(IDC_GROUP_OPTION,TOP_LEFT,TOP_RIGHT);
	AddAnchor(IDC_PUTTYKEY_AUTOLOAD,BOTTOM_LEFT);
	AddAnchor(IDC_CHECK_PRUNE,BOTTOM_LEFT);
	AddAnchor(IDC_CHECK_REBASE,BOTTOM_LEFT);
	AddAnchor(IDC_REMOTE_MANAGE,BOTTOM_LEFT);
	AddAnchor(IDHELP, BOTTOM_RIGHT);

	AdjustControlSize(IDC_REMOTE_RD);
	AdjustControlSize(IDC_OTHER_RD);
	AdjustControlSize(IDC_CHECK_SQUASH);
	AdjustControlSize(IDC_CHECK_NOCOMMIT);
	AdjustControlSize(IDC_CHECK_DEPTH);
	AdjustControlSize(IDC_CHECK_NOFF);
	AdjustControlSize(IDC_CHECK_FFONLY);
	AdjustControlSize(IDC_CHECK_FETCHTAGS);
	AdjustControlSize(IDC_PUTTYKEY_AUTOLOAD);
	AdjustControlSize(IDC_CHECK_REBASE);
	AdjustControlSize(IDC_CHECK_PRUNE);

	CString WorkingDir=g_Git.m_CurrentDir;
	WorkingDir.Replace(_T(':'),_T('_'));

	m_RemoteReg = CRegString(CString(_T("Software\\TortoiseGit\\History\\PullRemote\\")+WorkingDir));
	CString regkey;
	regkey.Format(_T("Software\\TortoiseGit\\TortoiseProc\\PullFetch\\%s_%d\\rebase"), (LPCTSTR)WorkingDir, m_IsPull);
	m_regRebase=CRegDWORD(regkey,false);
	regkey.Format(_T("Software\\TortoiseGit\\TortoiseProc\\PullFetch\\%s_%d\\ffonly"), (LPCTSTR)WorkingDir, m_IsPull);
	m_regFFonly = CRegDWORD(regkey, false);
	regkey.Format(_T("Software\\TortoiseGit\\TortoiseProc\\PullFetch\\%s_%d\\autoload"), (LPCTSTR)WorkingDir, m_IsPull);

	m_regAutoLoadPutty = CRegDWORD(regkey,this->m_bAutoLoad);
	m_bAutoLoad = m_regAutoLoadPutty;

	if(!CAppUtils::IsSSHPutty())
		m_bAutoLoad = false;

	m_bRebase = m_regRebase;

	CAutoRepository repo(g_Git.GetGitRepository());
	if (!repo)
		MessageBox(CGit::GetLibGit2LastErr(_T("Could not open repository.")), _T("TortoiseGit"), MB_OK | MB_ICONERROR);

	// Check config branch.<name>.rebase and pull.reabse
	do
	{
		if (!m_IsPull)
			break;
		if (!repo)
			break;

		if (git_repository_head_detached(repo) == 1)
			break;

		CAutoConfig config(true);
		if (git_repository_config(config.GetPointer(), repo))
			break;

		BOOL rebase = FALSE;
		// branch.<name>.rebase overrides pull.rebase
		if (config.GetBOOL(_T("branch.") + g_Git.GetCurrentBranch() + _T(".rebase"), rebase) == GIT_ENOTFOUND)
		{
			if (config.GetBOOL(_T("pull.rebase"), rebase) == GIT_ENOTFOUND)
				break;
			else if (CRegDWORD(L"Software\\TortoiseGit\\PullRebaseBehaviorLike1816", FALSE) == FALSE)
			{
				CString value;
				config.GetString(_T("pull.rebase"), value);
				if (value == _T("preserve"))
				{
					rebase = TRUE;
					m_bRebasePreserveMerges = true;
				}
			}
		}
		else if (CRegDWORD(L"Software\\TortoiseGit\\PullRebaseBehaviorLike1816", FALSE) == FALSE)
		{
			CString value;
			config.GetString(_T("branch.") + g_Git.GetCurrentBranch() + _T(".rebase"), value);
			if (value == _T("preserve"))
			{
				rebase = TRUE;
				m_bRebasePreserveMerges = true;
			}
		}
		if (!rebase)
			break;

		// Since rebase = true in config, means that "git.exe pull" will ALWAYS rebase without "--rebase".
		// So, lock it, then let Fetch Rebase do the rest things.
		m_bRebase = TRUE;
		m_bRebaseActivatedInConfigForPull = (CRegDWORD(L"Software\\TortoiseGit\\PullRebaseBehaviorLike1816", FALSE) == FALSE);
	} while (0);

	this->UpdateData(FALSE);

	this->AddOthersToAnchor();

	this->GetDlgItem(IDC_PUTTYKEY_AUTOLOAD)->EnableWindow(m_bAutoLoadEnable);

	CheckRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD,IDC_REMOTE_RD);
	m_Remote.EnableWindow(TRUE);
	m_Remote.SetMaxHistoryItems(0x7FFFFFFF);
	m_Other.EnableWindow(FALSE);
	if(!m_IsPull)
	{
		m_RemoteBranch.EnableWindow(FALSE);
		GetDlgItem(IDC_BUTTON_BROWSE_REF)->EnableWindow(FALSE);
	}

	if(m_IsPull)
	{
		m_bFFonly = m_regFFonly;
		UpdateData(FALSE);
		OnBnClickedCheckFfonly();
	}
	else
	{
		this->GetDlgItem(IDC_GROUP_OPTION)->EnableWindow(FALSE);
		this->GetDlgItem(IDC_CHECK_SQUASH)->EnableWindow(FALSE);
		this->GetDlgItem(IDC_CHECK_NOFF)->EnableWindow(FALSE);
		this->GetDlgItem(IDC_CHECK_FFONLY)->EnableWindow(FALSE);
		this->GetDlgItem(IDC_CHECK_NOCOMMIT)->EnableWindow(FALSE);
	}

	if (GitAdminDir::IsBareRepo(g_Git.m_CurrentDir))
		this->GetDlgItem(IDC_CHECK_REBASE)->EnableWindow(FALSE);

	if (repo && git_repository_is_shallow(repo))
	{
		m_bDepth = TRUE;
		UpdateData(FALSE);
	}
	else
	{
		GetDlgItem(IDC_CHECK_DEPTH)->ShowWindow(SW_HIDE);
		GetDlgItem(IDC_EDIT_DEPTH)->ShowWindow(SW_HIDE);
	}
	OnBnClickedCheckDepth();

	m_Other.SetCaseSensitive(TRUE);
	m_Other.SetURLHistory(TRUE);
	m_Other.LoadHistory(_T("Software\\TortoiseGit\\History\\PullURLS"), _T("url"));

	m_RemoteBranch.LoadHistory(_T("Software\\TortoiseGit\\History\\PullRemoteBranch"), _T("br"));
	m_RemoteBranch.SetCurSel(0);

	CString sWindowTitle;
	if(m_IsPull)
		sWindowTitle.LoadString(IDS_PROGRS_TITLE_PULL);
	else
		sWindowTitle.LoadString(IDS_PROGRS_TITLE_FETCH);

	CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle);

	Refresh();

	EnableSaveRestore(_T("PullFetchDlg"));
	this->m_RemoteManage.SetURL(CString());
	return TRUE;
}
Ejemplo n.º 3
0
BOOL CPullFetchDlg::OnInitDialog()
{
    CHorizontalResizableStandAloneDialog::OnInitDialog();
    CAppUtils::MarkWindowAsUnpinnable(m_hWnd);

    AddAnchor(IDC_REMOTE_COMBO, TOP_LEFT, TOP_RIGHT);
    AddAnchor(IDC_OTHER, TOP_LEFT,TOP_RIGHT);

    AddAnchor(IDC_REMOTE_BRANCH, TOP_LEFT,TOP_RIGHT);
    AddAnchor(IDC_BUTTON_BROWSE_REF,TOP_RIGHT);

    AddAnchor(IDOK,BOTTOM_RIGHT);
    AddAnchor(IDCANCEL,BOTTOM_RIGHT);
    AddAnchor(IDC_GROUPT_REMOTE,TOP_LEFT,TOP_RIGHT);
    AddAnchor(IDC_GROUP_OPTION,TOP_LEFT,TOP_RIGHT);
    AddAnchor(IDC_PUTTYKEY_AUTOLOAD,BOTTOM_LEFT);
    AddAnchor(IDC_CHECK_PRUNE,BOTTOM_LEFT);
    AddAnchor(IDC_CHECK_REBASE,BOTTOM_LEFT);
    AddAnchor(IDC_REMOTE_MANAGE,BOTTOM_LEFT);
    AddAnchor(IDHELP, BOTTOM_RIGHT);

    AdjustControlSize(IDC_REMOTE_RD);
    AdjustControlSize(IDC_OTHER_RD);
    AdjustControlSize(IDC_CHECK_SQUASH);
    AdjustControlSize(IDC_CHECK_NOCOMMIT);
    AdjustControlSize(IDC_CHECK_DEPTH);
    AdjustControlSize(IDC_CHECK_NOFF);
    AdjustControlSize(IDC_CHECK_FFONLY);
    AdjustControlSize(IDC_CHECK_FETCHTAGS);
    AdjustControlSize(IDC_PUTTYKEY_AUTOLOAD);
    AdjustControlSize(IDC_CHECK_REBASE);
    AdjustControlSize(IDC_CHECK_PRUNE);

    CString WorkingDir=g_Git.m_CurrentDir;
    WorkingDir.Replace(_T(':'),_T('_'));

    m_RemoteReg = CRegString(CString(_T("Software\\TortoiseGit\\History\\PullRemote\\")+WorkingDir));
    CString regkey;
    regkey.Format(_T("Software\\TortoiseGit\\TortoiseProc\\PullFetch\\%s_%d\\rebase"),WorkingDir,this->m_IsPull);
    m_regRebase=CRegDWORD(regkey,false);
    regkey.Format(_T("Software\\TortoiseGit\\TortoiseProc\\PullFetch\\%s_%d\\ffonly"), WorkingDir, m_IsPull);
    m_regFFonly = CRegDWORD(regkey, false);
    regkey.Format(_T("Software\\TortoiseGit\\TortoiseProc\\PullFetch\\%s_%d\\autoload"),WorkingDir,this->m_IsPull);

    m_regAutoLoadPutty = CRegDWORD(regkey,this->m_bAutoLoad);
    m_bAutoLoad = m_regAutoLoadPutty;

    if(!CAppUtils::IsSSHPutty())
        m_bAutoLoad = false;

    if(m_bAllowRebase)
    {
        this->m_bRebase = m_regRebase;
    }
    else
    {
        GetDlgItem(IDC_CHECK_REBASE)->ShowWindow(SW_HIDE);
        this->m_bRebase = FALSE;
    }

    this->UpdateData(FALSE);

    this->AddOthersToAnchor();

    this->GetDlgItem(IDC_PUTTYKEY_AUTOLOAD)->EnableWindow(m_bAutoLoadEnable);

    CheckRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD,IDC_REMOTE_RD);
    m_Remote.EnableWindow(TRUE);
    m_Other.EnableWindow(FALSE);
    if(!m_IsPull)
    {
        m_RemoteBranch.EnableWindow(FALSE);
        GetDlgItem(IDC_BUTTON_BROWSE_REF)->EnableWindow(FALSE);
    }

    if(m_IsPull)
    {
        GetDlgItem(IDC_CHECK_REBASE)->ShowWindow(SW_HIDE);
        // check tags checkbox and make it a normal checkbox
        m_bFetchTags = 1;
        m_bFFonly = m_regFFonly;
        UpdateData(FALSE);
        ::SendMessage(GetDlgItem(IDC_CHECK_FETCHTAGS)->GetSafeHwnd(), BM_SETSTYLE, GetDlgItem(IDC_CHECK_FETCHTAGS)->GetStyle() & ~BS_AUTO3STATE | BS_AUTOCHECKBOX, 0);
        OnBnClickedCheckFfonly();
    }
    else
    {
        this->GetDlgItem(IDC_GROUP_OPTION)->EnableWindow(FALSE);
        this->GetDlgItem(IDC_CHECK_SQUASH)->EnableWindow(FALSE);
        this->GetDlgItem(IDC_CHECK_NOFF)->EnableWindow(FALSE);
        this->GetDlgItem(IDC_CHECK_FFONLY)->EnableWindow(FALSE);
        this->GetDlgItem(IDC_CHECK_NOCOMMIT)->EnableWindow(FALSE);
    }

    if (g_GitAdminDir.IsBareRepo(g_Git.m_CurrentDir))
        this->GetDlgItem(IDC_CHECK_REBASE)->EnableWindow(FALSE);

    CAutoRepository repo(g_Git.GetGitRepository());
    if (!repo)
        MessageBox(CGit::GetLibGit2LastErr(_T("Could not open repository.")), _T("TortoiseGit"), MB_OK | MB_ICONERROR);
    if (repo && git_repository_is_shallow(repo))
    {
        m_bDepth = TRUE;
        UpdateData(FALSE);
    }
    else
    {
        GetDlgItem(IDC_CHECK_DEPTH)->ShowWindow(SW_HIDE);
        GetDlgItem(IDC_EDIT_DEPTH)->ShowWindow(SW_HIDE);
    }
    OnBnClickedCheckDepth();

    m_Other.SetCaseSensitive(TRUE);
    m_Other.SetURLHistory(TRUE);
    m_Other.LoadHistory(_T("Software\\TortoiseGit\\History\\PullURLS"), _T("url"));

    m_RemoteBranch.LoadHistory(_T("Software\\TortoiseGit\\History\\PullRemoteBranch"), _T("br"));
    m_RemoteBranch.SetCurSel(0);

    CString sWindowTitle;
    if(m_IsPull)
        sWindowTitle = CString(MAKEINTRESOURCE(IDS_PROGRS_TITLE_PULL));
    else
        sWindowTitle = CString(MAKEINTRESOURCE(IDS_PROGRS_TITLE_FETCH));

    CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle);

    Refresh();

    EnableSaveRestore(_T("PullFetchDlg"));
    this->m_RemoteManage.SetURL(CString());
    return TRUE;
}
Ejemplo n.º 4
0
/*
 * $ git blame -n 359fc2d -- include/git2.h
 *                     orig line no                                final line no
 * commit   orig path       V  author              timestamp                  V
 * d12299fe src/git.h       1 (Vicent Martí        2010-12-03 22:22:10 +0200  1
 * 359fc2d2 include/git2.h  2 (Edward Thomson      2013-01-08 17:07:25 -0600  2
 * d12299fe src/git.h       5 (Vicent Martí        2010-12-03 22:22:10 +0200  3
 * bb742ede include/git2.h  4 (Vicent Martí        2011-09-19 01:54:32 +0300  4
 * bb742ede include/git2.h  5 (Vicent Martí        2011-09-19 01:54:32 +0300  5
 * d12299fe src/git.h      24 (Vicent Martí        2010-12-03 22:22:10 +0200  6
 * d12299fe src/git.h      25 (Vicent Martí        2010-12-03 22:22:10 +0200  7
 * d12299fe src/git.h      26 (Vicent Martí        2010-12-03 22:22:10 +0200  8
 * d12299fe src/git.h      27 (Vicent Martí        2010-12-03 22:22:10 +0200  9
 * d12299fe src/git.h      28 (Vicent Martí        2010-12-03 22:22:10 +0200 10
 * 96fab093 include/git2.h 11 (Sven Strickroth     2011-10-09 18:37:41 +0200 11
 * 9d1dcca2 src/git2.h     33 (Vicent Martí        2011-02-07 10:35:58 +0200 12
 * 44908fe7 src/git2.h     29 (Vicent Martí        2010-12-06 23:03:16 +0200 13
 * a15c550d include/git2.h 14 (Vicent Martí        2011-11-16 14:09:44 +0100 14
 * 44908fe7 src/git2.h     30 (Vicent Martí        2010-12-06 23:03:16 +0200 15
 * d12299fe src/git.h      32 (Vicent Martí        2010-12-03 22:22:10 +0200 16
 * 44908fe7 src/git2.h     33 (Vicent Martí        2010-12-06 23:03:16 +0200 17
 * d12299fe src/git.h      34 (Vicent Martí        2010-12-03 22:22:10 +0200 18
 * 44908fe7 src/git2.h     35 (Vicent Martí        2010-12-06 23:03:16 +0200 19
 * 638c2ca4 src/git2.h     36 (Vicent Martí        2010-12-18 02:10:25 +0200 20
 * 44908fe7 src/git2.h     36 (Vicent Martí        2010-12-06 23:03:16 +0200 21
 * d12299fe src/git.h      37 (Vicent Martí        2010-12-03 22:22:10 +0200 22
 * 44908fe7 src/git2.h     38 (Vicent Martí        2010-12-06 23:03:16 +0200 23
 * 44908fe7 src/git2.h     39 (Vicent Martí        2010-12-06 23:03:16 +0200 24
 * bf787bd8 include/git2.h 25 (Carlos Martín Nieto 2012-04-08 18:56:50 +0200 25
 * 0984c876 include/git2.h 26 (Scott J. Goldman    2012-11-28 18:27:43 -0800 26
 * 2f8a8ab2 src/git2.h     41 (Vicent Martí        2011-01-29 01:56:25 +0200 27
 * 27df4275 include/git2.h 47 (Michael Schubert    2011-06-28 14:13:12 +0200 28
 * a346992f include/git2.h 28 (Ben Straub          2012-05-10 09:47:14 -0700 29
 * d12299fe src/git.h      40 (Vicent Martí        2010-12-03 22:22:10 +0200 30
 * 44908fe7 src/git2.h     41 (Vicent Martí        2010-12-06 23:03:16 +0200 31
 * 44908fe7 src/git2.h     42 (Vicent Martí        2010-12-06 23:03:16 +0200 32
 * 44908fe7 src/git2.h     43 (Vicent Martí        2010-12-06 23:03:16 +0200 33
 * 44908fe7 src/git2.h     44 (Vicent Martí        2010-12-06 23:03:16 +0200 34
 * 44908fe7 src/git2.h     45 (Vicent Martí        2010-12-06 23:03:16 +0200 35
 * 65b09b1d include/git2.h 33 (Russell Belfer      2012-02-02 18:03:43 -0800 36
 * d12299fe src/git.h      46 (Vicent Martí        2010-12-03 22:22:10 +0200 37
 * 44908fe7 src/git2.h     47 (Vicent Martí        2010-12-06 23:03:16 +0200 38
 * 5d4cd003 include/git2.h 55 (Carlos Martín Nieto 2011-03-28 17:02:45 +0200 39
 * 41fb1ca0 include/git2.h 39 (Philip Kelley       2012-10-29 13:41:14 -0400 40
 * 2dc31040 include/git2.h 56 (Carlos Martín Nieto 2011-06-20 18:58:57 +0200 41
 * 764df57e include/git2.h 40 (Ben Straub          2012-06-15 13:14:43 -0700 42
 * 5280f4e6 include/git2.h 41 (Ben Straub          2012-07-31 19:39:06 -0700 43
 * 613d5eb9 include/git2.h 43 (Philip Kelley       2012-11-28 11:42:37 -0500 44
 * d12299fe src/git.h      48 (Vicent Martí        2010-12-03 22:22:10 +0200 45
 * 111ee3fe include/git2.h 41 (Vicent Martí        2012-07-11 14:37:26 +0200 46
 * f004c4a8 include/git2.h 44 (Russell Belfer      2012-08-21 17:26:39 -0700 47
 * 111ee3fe include/git2.h 42 (Vicent Martí        2012-07-11 14:37:26 +0200 48
 * 9c82357b include/git2.h 58 (Carlos Martín Nieto 2011-06-17 18:13:14 +0200 49
 * d6258deb include/git2.h 61 (Carlos Martín Nieto 2011-06-25 15:10:09 +0200 50
 * b311e313 include/git2.h 63 (Julien Miotte       2011-07-27 18:31:13 +0200 51
 * 3412391d include/git2.h 63 (Carlos Martín Nieto 2011-07-07 11:47:31 +0200 52
 * bfc9ca59 include/git2.h 43 (Russell Belfer      2012-03-28 16:45:36 -0700 53
 * bf477ed4 include/git2.h 44 (Michael Schubert    2012-02-15 00:33:38 +0100 54
 * edebceff include/git2.h 46 (nulltoken           2012-05-01 13:57:45 +0200 55
 * 743a4b3b include/git2.h 48 (nulltoken           2012-06-15 22:24:59 +0200 56
 * 0a32dca5 include/git2.h 54 (Michael Schubert    2012-08-19 22:26:32 +0200 57
 * 590fb68b include/git2.h 55 (nulltoken           2012-10-04 13:47:45 +0200 58
 * bf477ed4 include/git2.h 45 (Michael Schubert    2012-02-15 00:33:38 +0100 59
 * d12299fe src/git.h      49 (Vicent Martí        2010-12-03 22:22:10 +0200 60
 */
void test_blame_simple__trivial_libgit2(void)
{
	git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
	git_object *obj;

	/* If we can't open the libgit2 repo or if it isn't a full repo
	 * with proper history, just skip this test */
	if (git_repository_open(&g_repo, cl_fixture("../..")) < 0)
		cl_skip();

	if (git_repository_is_shallow(g_repo))
		cl_skip();

	if (git_revparse_single(&obj, g_repo, "359fc2d") < 0)
		cl_skip();

	git_oid_cpy(&opts.newest_commit, git_object_id(obj));
	git_object_free(obj);

	cl_git_pass(git_blame_file(&g_blame, g_repo, "include/git2.h", &opts));

	check_blame_hunk_index(g_repo, g_blame,  0,  1, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame,  1,  2, 1, 0, "359fc2d2", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame,  2,  3, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame,  3,  4, 2, 0, "bb742ede", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame,  4,  6, 5, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame,  5, 11, 1, 0, "96fab093", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame,  6, 12, 1, 0, "9d1dcca2", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame,  7, 13, 1, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame,  8, 14, 1, 0, "a15c550d", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame,  9, 15, 1, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 10, 16, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame, 11, 17, 1, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 12, 18, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame, 13, 19, 1, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 14, 20, 1, 0, "638c2ca4", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 15, 21, 1, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 16, 22, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame, 17, 23, 2, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 18, 25, 1, 0, "bf787bd8", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 19, 26, 1, 0, "0984c876", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 20, 27, 1, 0, "2f8a8ab2", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 21, 28, 1, 0, "27df4275", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 22, 29, 1, 0, "a346992f", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 23, 30, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame, 24, 31, 5, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 25, 36, 1, 0, "65b09b1d", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 26, 37, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame, 27, 38, 1, 0, "44908fe7", "src/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 28, 39, 1, 0, "5d4cd003", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 29, 40, 1, 0, "41fb1ca0", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 30, 41, 1, 0, "2dc31040", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 31, 42, 1, 0, "764df57e", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 32, 43, 1, 0, "5280f4e6", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 33, 44, 1, 0, "613d5eb9", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 34, 45, 1, 0, "d12299fe", "src/git.h");
	check_blame_hunk_index(g_repo, g_blame, 35, 46, 1, 0, "111ee3fe", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 36, 47, 1, 0, "f004c4a8", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 37, 48, 1, 0, "111ee3fe", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 38, 49, 1, 0, "9c82357b", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 39, 50, 1, 0, "d6258deb", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 40, 51, 1, 0, "b311e313", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 41, 52, 1, 0, "3412391d", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 42, 53, 1, 0, "bfc9ca59", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 43, 54, 1, 0, "bf477ed4", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 44, 55, 1, 0, "edebceff", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 45, 56, 1, 0, "743a4b3b", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 46, 57, 1, 0, "0a32dca5", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 47, 58, 1, 0, "590fb68b", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 48, 59, 1, 0, "bf477ed4", "include/git2.h");
	check_blame_hunk_index(g_repo, g_blame, 49, 60, 1, 0, "d12299fe", "src/git.h");
}