path: root/mailmap.c
AgeCommit message (Collapse)Author
2010-01-12mailmap.c: remove unused functionJunio C Hamano
map_email() is not used anywhere. Signed-off-by: Junio C Hamano <>
2009-06-21Fix various sparse warnings in the git source codeLinus Torvalds
There are a few remaining ones, but this fixes the trivial ones. It boils down to two main issues that sparse complains about: - warning: Using plain integer as NULL pointer Sparse doesn't like you using '0' instead of 'NULL'. For various good reasons, not the least of which is just the visual confusion. A NULL pointer is not an integer, and that whole "0 works as NULL" is a historical accident and not very pretty. A few of these remain: zlib is a total mess, and Z_NULL is just a 0. I didn't touch those. - warning: symbol 'xyz' was not declared. Should it be static? Sparse wants to see declarations for any functions you export. A lack of a declaration tends to mean that you should either add one, or you should mark the function 'static' to show that it's in file scope. A few of these remain: I only did the ones that should obviously just be made static. That 'wt_status_submodule_summary' one is debatable. It has a few related flags (like 'wt_status_use_color') which _are_ declared, and are used by builtin-commit.c. So maybe we'd like to export it at some point, but it's not declared now, and not used outside of that file, so 'static' it is in this patch. Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
2009-04-02Merge branch 'maint'Junio C Hamano
* maint: Documentation: Remove an odd "instead" fix portability problem with IS_RUN_COMMAND_ERR mailmap: resurrect lower-casing of email addresses
2009-04-01Mailmap: Allow empty email addresses to be mappedBjörn Steinbrink
While it makes no sense to map some email address to an empty one, doing things the other way around can be useful. For example when using filter-branch with an env-filter that employs a mailmap to fix up an import that created such broken commits with empty email addresses. Signed-off-by: Björn Steinbrink <> Signed-off-by: Junio C Hamano <>
2009-04-01mailmap: resurrect lower-casing of email addressesJohannes Schindelin
Commit 0925ce4(Add map_user() and clear_mailmap() to mailmap) broke the lower-casing of email addresses. This mostly did not matter if your .mailmap has only lower-case email addresses; However, we did not require .mailmap to contain lowercase-only email addresses. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2009-02-08Add map_user() and clear_mailmap() to mailmapMarius Storm-Olsen
map_user() allows to lookup and replace both email and name of a user, based on a new style mailmap file. The possible mailmap definitions are now: proper_name <commit_email> # Old style <proper_email> <commit_email> # New style proper_name <proper_email> <commit_email> # New style proper_name <proper_email> commit_name <commit_email> # New style map_email() operates the same as before, with the exception that it also will to try to match on a name passed in through the name return buffer. clear_mailmap() is needed to now clear the more complex mailmap structure. Signed-off-by: Marius Storm-Olsen <> Signed-off-by: Junio C Hamano <>
2009-02-08Add mailmap.file as configurational option for mailmap locationMarius Storm-Olsen
This allows us to augment the repo mailmap file, and to use mailmap files elsewhere than the repository root. Meaning that the entries in mailmap.file will override the entries in "./.mailmap", should they match. Signed-off-by: Marius Storm-Olsen <> Signed-off-by: Junio C Hamano <>
2008-07-22Rename path_list to string_listJohannes Schindelin
The name path_list was correct for the first usage of that data structure, but it really is a general-purpose string list. $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list) $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list) $ git mv path-list.h string-list.h $ git mv path-list.c string-list.c $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path) $ perl -i -pe 's/path/string/g' string-list.[ch] $ git mv Documentation/technical/api-path-list.txt \ Documentation/technical/api-string-list.txt $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths) ... and then fix all users of string-list to access the member "string" instead of "path". Documentation/technical/api-string-list.txt needed some rewrapping, too. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-12-08mailmap: fix bogus for() loop that happened to be safe by accidentJunio C Hamano
The empty loop pretended to have an empty statement as its body by a phony indentation, but in fact was slurping the next statement into it. Signed-off-by: Junio C Hamano <>
2007-06-07War on whitespaceJunio C Hamano
This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <>
2007-04-30Include mailmap.h in mailmap.c to catch mailmap interface changesAlex Riesen
Signed-off-by: Alex Riesen <> Signed-off-by: Junio C Hamano <>
2007-04-30Fix read_mailmap to handle a caller uninterested in repo abbreviationAlex Riesen
The only such a caller builtin-blame.c would pass NULL as the place where to store the abbreviation. Signed-off-by: Alex Riesen <> Signed-off-by: Junio C Hamano <>
2007-04-30Use strlcpy instead of strncpy in mailmap.cAlex Riesen
strncpy does not NUL-terminate output in case of output buffer too short, and map_email prototype (and usage) does not allow for figuring out what the length of the name is. Signed-off-by: Alex Riesen <> Signed-off-by: Junio C Hamano <>
2007-04-29Split out mailmap handling out of shortlogJunio C Hamano
This splits out a few functions to deal with mailmap from shortlog and makes it a bit more usable from other programs. Most notably, it does not clobber input e-mail address anymore. Signed-off-by: Junio C Hamano <>