forked from libgit2/libgit2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: mailmap: avoid definition of unused static variables
The mailmap testdata header contains a set of static variable definitions. As these variables aren't used in all places where they are used, they trigger the unused-const-variable warnings. As we have currently disabled those warnings explicitly, they are never triggered, but we intend to enable them. Avoid the issue by only keeping variable definitions that are actually used in all locations. Move the others to where they are used.
- Loading branch information
Showing
2 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,29 +7,6 @@ typedef struct mailmap_entry { | |
const char *replace_email; | ||
} mailmap_entry; | ||
|
||
static const char string_mailmap[] = | ||
"# Simple Comment line\n" | ||
"<[email protected]> <[email protected]>\n" | ||
"Some Dude <[email protected]> nick1 <[email protected]>\n" | ||
"Other Author <[email protected]> nick2 <[email protected]>\n" | ||
"Other Author <[email protected]> <[email protected]>\n" | ||
"Phil Hill <[email protected]> # Comment at end of line\n" | ||
"<[email protected]> Joseph <[email protected]>\n" | ||
"Santa Claus <[email protected]> <[email protected]>\n" | ||
"Untracked <[email protected]>"; | ||
|
||
static const mailmap_entry entries[] = { | ||
{ NULL, "[email protected]", NULL, "[email protected]" }, | ||
{ "Some Dude", "[email protected]", "nick1", "[email protected]" }, | ||
{ "Other Author", "[email protected]", "nick2", "[email protected]" }, | ||
{ "Other Author", "[email protected]", NULL, "[email protected]" }, | ||
{ "Phil Hill", NULL, NULL, "[email protected]" }, | ||
{ NULL, "[email protected]", "Joseph", "[email protected]" }, | ||
{ "Santa Claus", "[email protected]", NULL, "[email protected]" }, | ||
/* This entry isn't in the bare repository */ | ||
{ "Untracked", NULL, NULL, "[email protected]" } | ||
}; | ||
|
||
static const mailmap_entry resolved[] = { | ||
{ "Brad", "[email protected]", "Brad", "[email protected]" }, | ||
{ "Brad L", "[email protected]", "Brad L", "[email protected]" }, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,29 @@ static git_repository *g_repo; | |
static git_mailmap *g_mailmap; | ||
static git_config *g_config; | ||
|
||
static const char string_mailmap[] = | ||
"# Simple Comment line\n" | ||
"<[email protected]> <[email protected]>\n" | ||
"Some Dude <[email protected]> nick1 <[email protected]>\n" | ||
"Other Author <[email protected]> nick2 <[email protected]>\n" | ||
"Other Author <[email protected]> <[email protected]>\n" | ||
"Phil Hill <[email protected]> # Comment at end of line\n" | ||
"<[email protected]> Joseph <[email protected]>\n" | ||
"Santa Claus <[email protected]> <[email protected]>\n" | ||
"Untracked <[email protected]>"; | ||
|
||
static const mailmap_entry entries[] = { | ||
{ NULL, "[email protected]", NULL, "[email protected]" }, | ||
{ "Some Dude", "[email protected]", "nick1", "[email protected]" }, | ||
{ "Other Author", "[email protected]", "nick2", "[email protected]" }, | ||
{ "Other Author", "[email protected]", NULL, "[email protected]" }, | ||
{ "Phil Hill", NULL, NULL, "[email protected]" }, | ||
{ NULL, "[email protected]", "Joseph", "[email protected]" }, | ||
{ "Santa Claus", "[email protected]", NULL, "[email protected]" }, | ||
/* This entry isn't in the bare repository */ | ||
{ "Untracked", NULL, NULL, "[email protected]" } | ||
}; | ||
|
||
void test_mailmap_parsing__initialize(void) | ||
{ | ||
g_repo = NULL; | ||
|