From: Junio C Hamano Date: Sun, 6 Jan 2013 07:41:42 +0000 (-0800) Subject: Merge branch 'jk/mailmap-from-blob' X-Git-Tag: v1.8.2-rc0~183 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3a3100a889cab5d3a1a590258304dacd188a17f6?ds=inline;hp=-c Merge branch 'jk/mailmap-from-blob' Allow us to read, and default to read, mailmap files from the tip of the history in bare repositories. This will help running tools like shortlog in server settings. * jk/mailmap-from-blob: mailmap: default mailmap.blob in bare repositories mailmap: fix some documentation loose-ends for mailmap.blob mailmap: clean up read_mailmap error handling mailmap: support reading mailmap from blobs mailmap: refactor mailmap parsing for non-file sources --- 3a3100a889cab5d3a1a590258304dacd188a17f6 diff --combined Documentation/config.txt index 50a2288999,1a3c554dbf..0e206759fd --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -140,11 -140,10 +140,11 @@@ advice.*: can tell Git that you do not need help by setting these to 'false': + -- - pushNonFastForward:: + pushUpdateRejected:: Set this variable to 'false' if you want to disable - 'pushNonFFCurrent', 'pushNonFFDefault', and - 'pushNonFFMatching' simultaneously. + 'pushNonFFCurrent', 'pushNonFFDefault', + 'pushNonFFMatching', and 'pushAlreadyExists' + simultaneously. pushNonFFCurrent:: Advice shown when linkgit:git-push[1] fails due to a non-fast-forward update to the current branch. @@@ -159,9 -158,6 +159,9 @@@ 'matching refs' explicitly (i.e. you used ':', or specified a refspec that isn't your current branch) and it resulted in a non-fast-forward error. + pushAlreadyExists:: + Shown when linkgit:git-push[1] rejects an update that + does not qualify for fast-forwarding (e.g., a tag.) statusHints:: Show directions on how to proceed from the current state in the output of linkgit:git-status[1], in @@@ -1521,6 -1517,14 +1521,14 @@@ mailmap.file: subdirectory, or somewhere outside of the repository itself. See linkgit:git-shortlog[1] and linkgit:git-blame[1]. + mailmap.blob:: + Like `mailmap.file`, but consider the value as a reference to a + blob in the repository. If both `mailmap.file` and + `mailmap.blob` are given, both are parsed, with entries from + `mailmap.file` taking precedence. In a bare repository, this + defaults to `HEAD:.mailmap`. In a non-bare repository, it + defaults to empty. + man.viewer:: Specify the programs that may be used to display help in the 'man' format. See linkgit:git-help[1]. diff --combined Documentation/mailmap.txt index dd89fca3f8,bb349c2db3..4a8c276529 --- a/Documentation/mailmap.txt +++ b/Documentation/mailmap.txt @@@ -1,5 -1,6 +1,6 @@@ If the file `.mailmap` exists at the toplevel of the repository, or at - the location pointed to by the mailmap.file configuration option, it + the location pointed to by the mailmap.file or mailmap.blob + configuration options, it is used to map author and committer names and email addresses to canonical real names and email addresses. @@@ -46,7 -47,7 +47,7 @@@ Jane Doe ------------ -Note how there is no need for an entry for , because the +Note how there is no need for an entry for ``, because the real name of that author is already correct. Example 2: Your repository contains commits from the following diff --combined cache.h index 8f89f17a0c,a65f6d141f..8ceb6b8e8d --- a/cache.h +++ b/cache.h @@@ -473,8 -473,6 +473,8 @@@ extern int index_name_is_other(const st extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int); extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int); +#define PATHSPEC_ONESTAR 1 /* the pathspec pattern sastisfies GFNM_ONESTAR */ + struct pathspec { const char **raw; /* get_pathspec() result, not freed by free_pathspec() */ int nr; @@@ -484,8 -482,7 +484,8 @@@ struct pathspec_item { const char *match; int len; - unsigned int use_wildcard:1; + int nowildcard_len; + int flags; } *items; }; @@@ -717,11 -714,10 +717,11 @@@ static inline int is_absolute_path(cons } int is_directory(const char *); const char *real_path(const char *path); +const char *real_path_if_valid(const char *path); const char *absolute_path(const char *path); const char *relative_path(const char *abs, const char *base); int normalize_path_copy(char *dst, const char *src); -int longest_ancestor_length(const char *path, const char *prefix_list); +int longest_ancestor_length(const char *path, struct string_list *prefixes); char *strip_path_suffix(const char *path, const char *suffix); int daemon_avoid_alias(const char *path); int offset_1st_component(const char *path); @@@ -1003,19 -999,14 +1003,19 @@@ struct ref unsigned char old_sha1[20]; unsigned char new_sha1[20]; char *symref; - unsigned int force:1, + unsigned int + force:1, + requires_force:1, merge:1, nonfastforward:1, + not_forwardable:1, + update:1, deletion:1; enum { REF_STATUS_NONE = 0, REF_STATUS_OK, REF_STATUS_REJECT_NONFASTFORWARD, + REF_STATUS_REJECT_ALREADY_EXISTS, REF_STATUS_REJECT_NODELETE, REF_STATUS_UPTODATE, REF_STATUS_REMOTE_REJECT, @@@ -1164,6 -1155,7 +1164,7 @@@ extern int author_ident_sufficiently_gi extern const char *git_commit_encoding; extern const char *git_log_output_encoding; extern const char *git_mailmap_file; + extern const char *git_mailmap_blob; /* IO helper functions */ extern void maybe_flush_or_die(FILE *, const char *);