Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4ff44be8
Commit
4ff44be8
authored
Mar 17, 2018
by
Nika Layzell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mailmap: Fix more bugs which snuck in when I rebased
parent
983b8c2d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
include/git2/mailmap.h
+2
-2
src/blame.c
+1
-0
src/mailmap.c
+2
-2
tests/mailmap/basic.c
+4
-4
tests/mailmap/blame.c
+0
-1
tests/mailmap/parsing.c
+1
-1
No files found.
include/git2/mailmap.h
View file @
4ff44be8
...
...
@@ -22,14 +22,14 @@ GIT_BEGIN_DECL
/**
* A single entry parsed from a mailmap.
*/
struct
git_mailmap_entry
{
typedef
struct
git_mailmap_entry
{
unsigned
int
version
;
const
char
*
real_name
;
/**< the real name (may be NULL) */
const
char
*
real_email
;
/**< the real email (may be NULL) */
const
char
*
replace_name
;
/**< the name to replace (may be NULL) */
const
char
*
replace_email
;
/**< the email to replace */
};
}
git_mailmap_entry
;
#define GIT_MAILMAP_ENTRY_VERSION 1
#define GIT_MAILMAP_ENTRY_INIT {GIT_MAILMAP_ENTRY_VERSION}
...
...
src/blame.c
View file @
4ff44be8
...
...
@@ -14,6 +14,7 @@
#include "git2/diff.h"
#include "git2/blob.h"
#include "git2/signature.h"
#include "git2/mailmap.h"
#include "util.h"
#include "repository.h"
#include "blame_git.h"
...
...
src/mailmap.c
View file @
4ff44be8
...
...
@@ -215,7 +215,7 @@ int git_mailmap_parse(
cleanup:
git__free
(
entry
);
if
(
error
<
0
)
if
(
error
<
0
)
{
git_mailmap_free
(
*
mailmap
);
*
mailmap
=
NULL
;
}
...
...
@@ -317,7 +317,7 @@ static int git_mailmap_from_bare_repo(
error
=
git_object_lookup_bypath
(
(
git_object
**
)
&
blob
,
tree
ish
,
tree
,
".mailmap"
,
GIT_OBJ_BLOB
);
if
(
error
<
0
)
...
...
tests/mailmap/basic.c
View file @
4ff44be8
...
...
@@ -15,7 +15,7 @@ const char TEST_MAILMAP[] =
void
test_mailmap_basic__initialize
(
void
)
{
cl_git_pass
(
git_mailmap_parse
(
&
mailmap
,
TEST_MAILMAP
,
sizeof
(
TEST_MAILMAP
)));
cl_git_pass
(
git_mailmap_parse
(
&
mailmap
,
TEST_MAILMAP
,
sizeof
(
TEST_MAILMAP
)
-
1
));
}
void
test_mailmap_basic__cleanup
(
void
)
...
...
@@ -28,7 +28,7 @@ void test_mailmap_basic__cleanup(void)
void
test_mailmap_basic__entry
(
void
)
{
git_mailmap_entry
*
entry
;
const
git_mailmap_entry
*
entry
;
cl_assert
(
git_mailmap_entry_count
(
mailmap
)
==
4
);
...
...
@@ -43,7 +43,7 @@ void test_mailmap_basic__entry(void)
void
test_mailmap_basic__lookup_not_found
(
void
)
{
git_mailmap_entry
*
entry
=
git_mailmap_entry_lookup
(
const
git_mailmap_entry
*
entry
=
git_mailmap_entry_lookup
(
mailmap
,
"Whoever"
,
"doesnotexist@fo.com"
);
...
...
@@ -52,7 +52,7 @@ void test_mailmap_basic__lookup_not_found(void)
void
test_mailmap_basic__lookup
(
void
)
{
git_mailmap_entry
*
entry
=
git_mailmap_entry_lookup
(
const
git_mailmap_entry
*
entry
=
git_mailmap_entry_lookup
(
mailmap
,
"Typoed the name once"
,
"foo@baz.com"
);
...
...
tests/mailmap/blame.c
View file @
4ff44be8
...
...
@@ -6,7 +6,6 @@
static
git_repository
*
g_repo
;
static
git_blame
*
g_blame
;
static
git_mailmap
*
g_mailmap
;
void
test_mailmap_blame__initialize
(
void
)
{
...
...
tests/mailmap/parsing.c
View file @
4ff44be8
...
...
@@ -24,7 +24,7 @@ void test_mailmap_parsing__cleanup(void)
static
void
check_mailmap_entries
(
const
git_mailmap
*
mailmap
,
const
mailmap_entry
*
entries
,
size_t
entries_size
)
{
const
mailmap_entry
*
parsed
=
NULL
;
const
git_
mailmap_entry
*
parsed
=
NULL
;
size_t
idx
=
0
;
/* Check that the parsed entries match */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment