File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed
Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ GIT_BEGIN_DECL
2222/**
2323 * A single entry parsed from a mailmap.
2424 */
25- struct git_mailmap_entry {
25+ typedef struct git_mailmap_entry {
2626 unsigned int version ;
2727
2828 const char * real_name ; /**< the real name (may be NULL) */
2929 const char * real_email ; /**< the real email (may be NULL) */
3030 const char * replace_name ; /**< the name to replace (may be NULL) */
3131 const char * replace_email ; /**< the email to replace */
32- };
32+ } git_mailmap_entry ;
3333
3434#define GIT_MAILMAP_ENTRY_VERSION 1
3535#define GIT_MAILMAP_ENTRY_INIT {GIT_MAILMAP_ENTRY_VERSION}
Original file line number Diff line number Diff line change 1414#include "git2/diff.h"
1515#include "git2/blob.h"
1616#include "git2/signature.h"
17+ #include "git2/mailmap.h"
1718#include "util.h"
1819#include "repository.h"
1920#include "blame_git.h"
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ int git_mailmap_parse(
215215
216216cleanup :
217217 git__free (entry );
218- if (error < 0 )
218+ if (error < 0 ) {
219219 git_mailmap_free (* mailmap );
220220 * mailmap = NULL ;
221221 }
@@ -317,7 +317,7 @@ static int git_mailmap_from_bare_repo(
317317
318318 error = git_object_lookup_bypath (
319319 (git_object * * ) & blob ,
320- treeish ,
320+ tree ,
321321 ".mailmap" ,
322322 GIT_OBJ_BLOB );
323323 if (error < 0 )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const char TEST_MAILMAP[] =
1515
1616void test_mailmap_basic__initialize (void )
1717{
18- cl_git_pass (git_mailmap_parse (& mailmap , TEST_MAILMAP , sizeof (TEST_MAILMAP )));
18+ cl_git_pass (git_mailmap_parse (& mailmap , TEST_MAILMAP , sizeof (TEST_MAILMAP ) - 1 ));
1919}
2020
2121void test_mailmap_basic__cleanup (void )
@@ -28,7 +28,7 @@ void test_mailmap_basic__cleanup(void)
2828
2929void test_mailmap_basic__entry (void )
3030{
31- git_mailmap_entry * entry ;
31+ const git_mailmap_entry * entry ;
3232
3333 cl_assert (git_mailmap_entry_count (mailmap ) == 4 );
3434
@@ -43,7 +43,7 @@ void test_mailmap_basic__entry(void)
4343
4444void test_mailmap_basic__lookup_not_found (void )
4545{
46- git_mailmap_entry * entry = git_mailmap_entry_lookup (
46+ const git_mailmap_entry * entry = git_mailmap_entry_lookup (
4747 mailmap ,
4848 "Whoever" ,
4949 "doesnotexist@fo.com" );
@@ -52,7 +52,7 @@ void test_mailmap_basic__lookup_not_found(void)
5252
5353void test_mailmap_basic__lookup (void )
5454{
55- git_mailmap_entry * entry = git_mailmap_entry_lookup (
55+ const git_mailmap_entry * entry = git_mailmap_entry_lookup (
5656 mailmap ,
5757 "Typoed the name once" ,
5858 "foo@baz.com" );
Original file line number Diff line number Diff line change 66
77static git_repository * g_repo ;
88static git_blame * g_blame ;
9- static git_mailmap * g_mailmap ;
109
1110void test_mailmap_blame__initialize (void )
1211{
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ void test_mailmap_parsing__cleanup(void)
2424static void check_mailmap_entries (
2525 const git_mailmap * mailmap , const mailmap_entry * entries , size_t entries_size )
2626{
27- const mailmap_entry * parsed = NULL ;
27+ const git_mailmap_entry * parsed = NULL ;
2828 size_t idx = 0 ;
2929
3030 /* Check that the parsed entries match */
You can’t perform that action at this time.
0 commit comments