summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-10log: add log.mailmap configuration optionAntoine Pelisse
Teach "log.mailmap" configuration variable to turn "--use-mailmap" option on to "git log", "git show" and "git whatchanged". The "--no-use-mailmap" option from the command line can countermand the setting. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10log: grep author/committer using mailmapAntoine Pelisse
Currently you can use mailmap to display log authors and committers but you can't use the mailmap to find commits with mapped values. This commit allows you to run: git log --use-mailmap --author mapped_name_or_email git log --use-mailmap --committer mapped_name_or_email Of course it only works if the --use-mailmap option is used. The new name and email are copied only when necessary. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10test: add test for --use-mailmap optionAntoine Pelisse
The new option '--use-mailmap' can be used to make sure that mailmap file is used to convert name when running log commands. The test is simple and checks that the Author line is correctly replaced when running log. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10log: add --use-mailmap optionAntoine Pelisse
Add the --use-mailmap option to log commands. It allows to display names from mailmap file when displaying logs, whatever the format used. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10pretty: use mailmap to display username and emailAntoine Pelisse
Use the mailmap information to display the rewritten username and email address in all log commands. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10mailmap: add mailmap structure to rev_info and ppAntoine Pelisse
Pass a mailmap from rev_info to pretty_print_context to so that the pretty printer can use rewritten name and email address when showing commits. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10mailmap: simplify map_user() interfaceAntoine Pelisse
Simplify map_user(), mostly to avoid copies of string buffers. It also simplifies caller functions. map_user() directly receive pointers and length from the commit buffer as mail and name. If mapping of the user and mail can be done, the pointer is updated to a new location. Lengths are also updated if necessary. The caller of map_user() can then copy the new email and name if necessary. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10mailmap: remove email copy and length limitationJunio C Hamano
In map_user(), we have email pointer that points at the beginning of an e-mail address, but the buffer is not terminated with a NUL after the e-mail address. It typically has ">" after the address, and it could have even more if it comes from author/committer line in a commit object. Or it may not have ">" after it. We used to copy the e-mail address proper into a temporary buffer before asking the string-list API to find the e-mail address in the mailmap, because string_list_lookup() function only takes a NUL terminated full string. Introduce a helper function lookup_prefix that takes the email pointer and the length, and finds a matching entry in the string list used for the mailmap, by doing the following: - First ask string_list_find_insert_index() where in its sorted list the e-mail address we have (including the possible trailing junk ">...") would be inserted. - It could find an exact match (e.g. we had a clean e-mail address without any trailing junk). We can return the item in that case. - Or it could return the index of an item that sorts after the e-mail address we have. - If we did not find an exact match against a clean e-mail address, then the record we are looking for in the mailmap has to exist before the index returned by the function (i.e. "email>junk" always sorts later than "email"). Iterate, starting from that index, down the map->items[] array until we find the exact record we are looking for, or we see a record with a key that definitely sorts earlier than the e-mail we are looking for (i.e. when we are looking for "email" in "email>junk", a record in the mailmap that begins with "emaik" strictly sorts before "email", if such a key existed in the mailmap). This, together with the earlier enhancement to support case-insensitive sorting, allow us to remove an extra copy of email buffer to downcase it. A part of this is based on Antoine Pelisse's previous work. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-07Use split_ident_line to parse author and committerAntoine Pelisse
Currently blame.c::get_acline(), pretty.c::pp_user_info() and shortlog.c::insert_one_record() are parsing author name, email, time and tz themselves. Use ident.c::split_ident_line() for better code reuse. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-07string-list: allow case-insensitive string listJunio C Hamano
Some string list needs to be searched case insensitively, and for that to work correctly, the string needs to be sorted case insensitively from the beginning. Allow a custom comparison function to be defined on a string list instance and use it throughout in place of strcmp(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10Sync with 1.8.0.2Junio C Hamano
* maint: Git 1.8.0.2 Documentation/git-stash.txt: add a missing verb git(1): remove a defunct link to "list of authors" Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10Git 1.8.0.2v1.8.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10Makefile: whitespace style fixes in macro definitionsStefano Lattarini
Consistently use a single space before and after the "=" (or ":=", "+=", etc.) in assignments to make macros. Granted, this was not a big deal, but I did find the needless inconsistency quite distracting. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10Documentation/git-stash.txt: add a missing verbSébastien Loriot
Signed-off-by: Sébastien Loriot <sloriot.ml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-09git(1): remove a defunct link to "list of authors"Junio C Hamano
The linked page has not been showing the promised "more complete list" for more than 6 months by now, and nobody has resurrected the list there nor elsewhere since then. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07Git 1.8.1-rc1v1.8.1-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07Documentation/diff-config: work around AsciiDoc misfortuneJunio C Hamano
The line that happens to begin with indent followed by "3. " was interpreted as if it was an enumerated list; just wrap the lines differently to work it around for now. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07Merge branch 'maint'Junio C Hamano
* maint: Update draft release notes to 1.8.0.2
2012-12-07Update draft release notes to 1.8.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07Merge branch 'jc/doc-push-satellite' into maintJunio C Hamano
* jc/doc-push-satellite: Documentation/git-push.txt: clarify the "push from satellite" workflow
2012-12-07Merge branch 'jc/same-encoding' into maintJunio C Hamano
Various codepaths checked if two encoding names are the same using ad-hoc code and some of them ended up asking iconv() to convert between "utf8" and "UTF-8". The former is not a valid way to spell the encoding name, but often people use it by mistake, and we equated them in some but not all codepaths. Introduce a new helper function to make these codepaths consistent. * jc/same-encoding: reencode_string(): introduce and use same_encoding()
2012-12-07Merge branch 'lt/diff-stat-show-0-lines' into maintJunio C Hamano
"git diff --stat" miscounted the total number of changed lines when binary files were involved and hidden beyond --stat-count. It also miscounted the total number of changed files when there were unmerged paths. * lt/diff-stat-show-0-lines: t4049: refocus tests diff --shortstat: do not count "unmerged" entries diff --stat: do not count "unmerged" entries diff --stat: move the "total count" logic to the last loop diff --stat: use "file" temporary variable to refer to data->files[i] diff --stat: status of unmodified pair in diff-q is not zero test: add failing tests for "diff --stat" to t4049 Fix "git diff --stat" for interesting - but empty - file changes
2012-12-07Merge branch 'master' of git://github.com/git-l10n/git-poJunio C Hamano
* 'master' of git://github.com/git-l10n/git-po: l10n: de.po: translate 22 new messages l10n: de.po: translate 825 new messages l10n: Update Swedish translation (1979t0f0u) l10n: vi.po: update to git-v1.8.0.1-347-gf94c3 l10n: Update git.pot (5 new, 1 removed messages)
2012-12-07Merge branch 'rr/t4041-cleanup'Junio C Hamano
* rr/t4041-cleanup: t4041 (diff-submodule-option): modernize style t4041 (diff-submodule-option): rewrite add_file() routine t4041 (diff-submodule-option): parse digests sensibly t4041 (diff-submodule-option): don't hardcode SHA-1 in expected outputs
2012-12-07Merge branch git://github.com/ralfth/git-po-deJiang Xin
* 'rt/de-l10n-updates-for-1.8.1' of git://github.com/ralfth/git-po-de: l10n: de.po: translate 22 new messages l10n: de.po: translate 825 new messages Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-12-06l10n: de.po: translate 22 new messagesRalf Thielow
Translate 22 new messages came from git.pot updates in 9306b5b (l10n: Update git.pot (3 new, 6 removed messages)), fe52cd6 (l10n: Update git.pot (14 new, 3 removed messages)) and f9472e3 (l10n: Update git.pot (5 new, 1 removed messages)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Michael J Gruber <git@drmicha.warpmail.net>
2012-12-06l10n: de.po: translate 825 new messagesRalf Thielow
Translate 825 new messages came from git.pot update in cc76011 ("l10n: Update git.pot (825 new, 24 removed messages)"). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Thomas Rast <trast@student.ethz.ch> Helped-by: Michael J Gruber <git@drmicha.warpmail.net>
2012-12-04Merge branch 'mm/status-push-pull-advise'Junio C Hamano
* mm/status-push-pull-advise: document that statusHints affects git checkout
2012-12-04document that statusHints affects git checkoutMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-03Git 1.8.1-rc0v1.8.1-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-03Merge branch 'mm/status-push-pull-advise'Junio C Hamano
Finishing touch to allow the new advice message squelched with an advice.* configuration variable. * mm/status-push-pull-advise: status: respect advice.statusHints for ahead/behind advice
2012-12-03status: respect advice.statusHints for ahead/behind adviceJeff King
If the user has unset advice.statusHints, we already suppress the "use git reset to..." hints in each stanza. The new "use git push to publish..." hint is the same type of hint. Let's respect statusHints for it, rather than making the user set yet another advice flag. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-02t4041 (diff-submodule-option): modernize styleRamkumar Ramachandra
- Enclose tests in single quotes as opposed to double quotes. This is the prevalent style in other tests. - Remove the unused variable $head4_full. - Indent the expected output so that it lines up with the rest of the test text. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-02t4041 (diff-submodule-option): rewrite add_file() routineRamkumar Ramachandra
Instead of "cd there and then come back", use the "cd there in a subshell" pattern. Also fix '&&' chaining in one place. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-02t4041 (diff-submodule-option): parse digests sensiblyRamkumar Ramachandra
`git rev-list --max-count=1 HEAD` is a roundabout way of saying `git rev-parse --verify HEAD`; replace a bunch of instances of the former with the latter. Also, don't unnecessarily `cut -c1-7` the rev-parse output when the `--short` option is available. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-30l10n: Update Swedish translation (1979t0f0u)Peter Krefting
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2012-11-30l10n: vi.po: update to git-v1.8.0.1-347-gf94c3Tran Ngoc Quan
* updated all new messages (1979t0f0u) Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2012-11-30l10n: Update git.pot (5 new, 1 removed messages)Jiang Xin
L10n for git 1.8.1 round 2: Generate po/git.pot from v1.8.0.1-347-gf94c3. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-11-29Update draft release notes to 1.8.1Junio C Hamano
2012-11-29Merge branch 'pw/p4-various-fixes'Junio C Hamano
* pw/p4-various-fixes: git p4: remove unneeded cmd initialization git p4: fix labelDetails typo in exception git p4 test: display unresolvable host error git p4: catch p4 errors when streaming file contents git p4: handle servers without move support git p4: catch p4 describe errors
2012-11-29Merge branch 'lt/diff-stat-show-0-lines'Junio C Hamano
"git diff --stat" miscounted the total number of changed lines when binary files were involved and hidden beyond --stat-count. It also miscounted the total number of changed files when there were unmerged paths. * lt/diff-stat-show-0-lines: t4049: refocus tests diff --shortstat: do not count "unmerged" entries diff --stat: do not count "unmerged" entries diff --stat: move the "total count" logic to the last loop diff --stat: use "file" temporary variable to refer to data->files[i] diff --stat: status of unmodified pair in diff-q is not zero test: add failing tests for "diff --stat" to t4049
2012-11-29Merge branch 'fc/remote-hg'Junio C Hamano
New remote helper for hg. * fc/remote-hg: (22 commits) remote-hg: fix for older versions of python remote-hg: fix for files with spaces remote-hg: avoid bad refs remote-hg: try the 'tip' if no checkout present remote-hg: fix compatibility with older versions of hg remote-hg: add missing config for basic tests remote-hg: the author email can be null remote-hg: add option to not track branches remote-hg: add extra author test remote-hg: add tests to compare with hg-git remote-hg: add bidirectional tests test-lib: avoid full path to store test results remote-hg: add basic tests remote-hg: fake bookmark when there's none remote-hg: add compat for hg-git author fixes remote-hg: add support for hg-git compat mode remote-hg: match hg merge behavior remote-hg: make sure the encoding is correct remote-hg: add support to push URLs remote-hg: add support for remote pushing ...
2012-11-29Merge branch 'mk/complete-tcsh'Junio C Hamano
Finishing touches for tcsh completion. * mk/complete-tcsh: Support for git aliasing for tcsh completion
2012-11-29Merge branch 'jc/doc-push-satellite'Junio C Hamano
* jc/doc-push-satellite: Documentation/git-push.txt: clarify the "push from satellite" workflow
2012-11-29Merge branch 'km/send-email-remove-cruft-in-address'Junio C Hamano
* km/send-email-remove-cruft-in-address: git-send-email: allow edit invalid email address git-send-email: ask what to do with an invalid email address git-send-email: remove invalid addresses earlier git-send-email: fix fallback code in extract_valid_address() git-send-email: remove garbage after email address
2012-11-29Merge branch 'jk/send-email-sender-prompt'Junio C Hamano
General clean-ups in various areas, originally written to support a patch that later turned out to be unneeded. * jk/send-email-sender-prompt: t9001: check send-email behavior with implicit sender t: add tests for "git var" ident: keep separate "explicit" flags for author and committer ident: make user_ident_explicitly_given static t7502: factor out autoident prerequisite test-lib: allow negation of prerequisites
2012-11-29Merge branch 'fc/send-email-no-sender-prompt'Junio C Hamano
* fc/send-email-no-sender-prompt: send-email: avoid questions when user has an ident
2012-11-29Merge branch 'er/doc-add-new-commands'Junio C Hamano
* er/doc-add-new-commands: Documentation: how to add a new command
2012-11-29Merge branch 'jl/submodule-rm'Junio C Hamano
Finishing touches to "git rm $submodule" that removes the working tree of a submodule. * jl/submodule-rm: Teach rm to remove submodules when given with a trailing '/'
2012-11-29Merge branch 'pp/gitweb-config-underscore'Junio C Hamano
The key "gitweb.remote_heads" is not legal git config; this maps it to "gitweb.remoteheads". * pp/gitweb-config-underscore: gitweb: make remote_heads config setting work