summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-23fsck: support demoting errors to warningsLibravatar Johannes Schindelin3-0/+34
We already have support in `git receive-pack` to deal with some legacy repositories which have non-fatal issues. Let's make `git fsck` itself useful with such repositories, too, by allowing users to ignore known issues, or at least demote those issues to mere warnings. Example: `git -c fsck.missingEmail=ignore fsck` would hide problems with missing emails in author, committer and tagger lines. In the same spirit that `git receive-pack`'s usage of the fsck machinery differs from `git fsck`'s – some of the non-fatal warnings in `git fsck` are fatal with `git receive-pack` when receive.fsckObjects = true, for example – we strictly separate the fsck.<msg-id> from the receive.fsck.<msg-id> settings. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: document the new receive.fsck.<msg-id> optionsLibravatar Johannes Schindelin1-0/+14
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: allow upgrading fsck warnings to errorsLibravatar Johannes Schindelin2-8/+18
The 'invalid tag name' and 'missing tagger entry' warnings can now be upgraded to errors by specifying `invalidTagName` and `missingTaggerEntry` in the receive.fsck.<msg-id> config setting. Incidentally, the missing tagger warning is now really shown as a warning (as opposed to being reported with the "error:" prefix, as it used to be the case before this commit). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: optionally ignore specific fsck issues completelyLibravatar Johannes Schindelin3-1/+14
An fsck issue in a legacy repository might be so common that one would like not to bother the user with mentioning it at all. With this change, that is possible by setting the respective message type to "ignore". This change "abuses" the missingEmail=warn test to verify that "ignore" is also accepted and works correctly. And while at it, it makes sure that multiple options work, too (they are passed to unpack-objects or index-pack as a comma-separated list via the --strict=... command-line option). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: disallow demoting grave fsck errors to warningsLibravatar Johannes Schindelin2-2/+22
Some kinds of errors are intrinsically unrecoverable (e.g. errors while uncompressing objects). It does not make sense to allow demoting them to mere warnings. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: add a simple test for receive.fsck.<msg-id>Libravatar Johannes Schindelin1-0/+21
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: make fsck_tag() warn-friendlyLibravatar Johannes Schindelin1-1/+2
When fsck_tag() identifies a problem with the commit, it should try to make it possible to continue checking the commit object, in case the user wants to demote the detected errors to mere warnings. Just like fsck_commit(), there are certain problems that could hide other issues with the same tag object. For example, if the 'type' line is not encountered in the correct position, the 'tag' line – if there is any – would not be handled at all. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: handle multiple authors in commits speciallyLibravatar Johannes Schindelin1-4/+13
This problem has been detected in the wild, and is the primary reason to introduce an option to demote certain fsck errors to warnings. Let's offer to ignore this particular problem specifically. Technically, we could handle such repositories by setting receive.fsck.<msg-id> to missingCommitter=warn, but that could hide missing tree objects in the same commit because we cannot continue verifying any commit object after encountering a missing committer line, while we can continue in the case of multiple author lines. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: make fsck_commit() warn-friendlyLibravatar Johannes Schindelin1-8/+20
When fsck_commit() identifies a problem with the commit, it should try to make it possible to continue checking the commit object, in case the user wants to demote the detected errors to mere warnings. Note that some problems are too problematic to simply ignore. For example, when the header lines are mixed up, we punt after encountering an incorrect line. Therefore, demoting certain warnings to errors can hide other problems. Example: demoting the missingauthor error to a warning would hide a problematic committer line. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: make fsck_ident() warn-friendlyLibravatar Johannes Schindelin1-22/+27
When fsck_ident() identifies a problem with the ident, it should still advance the pointer to the next line so that fsck can continue in the case of a mere warning. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: report the ID of the error/warningLibravatar Johannes Schindelin2-2/+22
Some repositories written by legacy code have objects with non-fatal fsck issues. To allow the user to ignore those issues, let's print out the ID (e.g. when encountering "missingEmail", the user might want to call `git config --add receive.fsck.missingEmail=warn`). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck (receive-pack): allow demoting errors to warningsLibravatar Johannes Schindelin5-2/+33
For example, missing emails in commit and tag objects can be demoted to mere warnings with git config receive.fsck.missingemail=warn The value is actually a comma-separated list. In case that the same key is listed in multiple receive.fsck.<msg-id> lines in the config, the latter configuration wins (this can happen for example when both $HOME/.gitconfig and .git/config contain message type settings). As git receive-pack does not actually perform the checks, it hands off the setting to index-pack or unpack-objects in the form of an optional argument to the --strict option. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23fsck: offer a function to demote fsck errors to warningsLibravatar Johannes Schindelin2-5/+80
There are legacy repositories out there whose older commits and tags have issues that prevent pushing them when 'receive.fsckObjects' is set. One real-life example is a commit object that has been hand-crafted to list two authors. Often, it is not possible to fix those issues without disrupting the work with said repositories, yet it is still desirable to perform checks by setting `receive.fsckObjects = true`. This commit is the first step to allow demoting specific fsck issues to mere warnings. The `fsck_set_msg_types()` function added by this commit parses a list of settings in the form: missingemail=warn,badname=warn,... Unfortunately, the FSCK_WARN/FSCK_ERROR flag is only really heeded by git fsck so far, but other call paths (e.g. git index-pack --strict) error out *always* no matter what type was specified. Therefore, we need to take extra care to set all message types to FSCK_ERROR by default in those cases. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-22fsck: provide a function to parse fsck message IDsLibravatar Johannes Schindelin1-2/+33
These functions will be used in the next commits to allow the user to ask fsck to handle specific problems differently, e.g. demoting certain errors to warnings. The upcoming `fsck_set_msg_types()` function has to handle partial strings because we would like to be able to parse, say, 'missingemail=warn,missingtaggerentry=warn' command line parameters (which will be passed by receive-pack to index-pack and unpack-objects). To make the parsing robust, we generate strings from the enum keys, and using these keys, we match up strings without dashes case-insensitively to the corresponding enum values. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-22fsck: introduce identifiers for fsck messagesLibravatar Johannes Schindelin3-78/+154
Instead of specifying whether a message by the fsck machinery constitutes an error or a warning, let's specify an identifier relating to the concrete problem that was encountered. This is necessary for upcoming support to be able to demote certain errors to warnings. In the process, simplify the requirements on the calling code: instead of having to handle full-blown varargs in every callback, we now send a string buffer ready to be used by the callback. We could use a simple enum for the message IDs here, but we want to guarantee that the enum values are associated with the appropriate message types (i.e. error or warning?). Besides, we want to introduce a parser in the next commit that maps the string representation to the enum value, hence we use the slightly ugly preprocessor construct that is extensible for use with said parser. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-22fsck: introduce fsck optionsLibravatar Johannes Schindelin5-93/+114
Just like the diff machinery, we are about to introduce more settings, therefore it makes sense to carry them around as a (pointer to a) struct containing all of them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-18git-multimail: update to release 1.1.0Libravatar Matthieu Moy6-326/+1017
The changes are described in CHANGES. Contributions-by: Matthieu Moy <Matthieu.Moy@imag.fr> Contributions-by: Richard Hansen <rhansen@rhansen.org> Contributions-by: Michael Haggerty <mhagger@alum.mit.edu> Contributions-by: Elijah Newren <newren@gmail.com> Contributions-by: Luke Mewburn <luke@mewburn.net> Contributions-by: Dave Boutcher <daveboutcher@gmail.com> Contributions-by: Azat Khuzhin <a3at.mail@gmail.com> Contributions-by: Sebastian Schuberth <sschuberth@gmail.com> Contributions-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi> Contributions-by: Elijah Newren <newren@palantir.com> Contributions-by: Benoît Ryder <benoit@ryder.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16Eighth batch for 2.5Libravatar Junio C Hamano1-1/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16Sync with 2.4.4Libravatar Junio C Hamano3-6/+42
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16Git 2.4.4Libravatar Junio C Hamano4-3/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16Merge branch 'jk/clone-dissociate' into maintLibravatar Junio C Hamano1-13/+4
Code clean-up. * jk/clone-dissociate: clone: reorder --dissociate and --reference options clone: use OPT_STRING_LIST for --reference
2015-06-16Merge branch 'sb/submodule-doc-intro' into maintLibravatar Junio C Hamano1-28/+22
* sb/submodule-doc-intro: submodule doc: reorder introductory paragraphs
2015-06-16Merge branch 'sb/glossary-submodule' into maintLibravatar Junio C Hamano1-0/+16
* sb/glossary-submodule: glossary: add "remote", "submodule", "superproject"
2015-06-16Merge branch 'ah/usage-strings' into maintLibravatar Junio C Hamano2-2/+2
A few usage string updates. * ah/usage-strings: blame, log: format usage strings similarly to those in documentation
2015-06-16Merge branch 'mc/commit-doc-grammofix' into maintLibravatar Junio C Hamano1-1/+1
Doc grammar fix. * mc/commit-doc-grammofix: Documentation/git-commit: grammofix
2015-06-16Merge branch 'rs/janitorial' into maintLibravatar Junio C Hamano7-26/+9
Code clean-up. * rs/janitorial: dir: remove unused variable sb clean: remove unused variable buf use file_exists() to check if a file exists in the worktree
2015-06-16Merge branch 'sb/test-bitmap-free-at-end' into maintLibravatar Junio C Hamano1-1/+1
An earlier leakfix to bitmap testing code was incomplete. * sb/test-bitmap-free-at-end: test_bitmap_walk: free bitmap with bitmap_free
2015-06-16Merge branch 'dt/clean-pathspec-filter-then-lstat' into maintLibravatar Junio C Hamano1-3/+3
"git clean pathspec..." tried to lstat(2) and complain even for paths outside the given pathspec. * dt/clean-pathspec-filter-then-lstat: clean: only lstat files in pathspec
2015-06-16Merge branch 'jk/http-backend-deadlock' into maintLibravatar Junio C Hamano3-29/+139
Communication between the HTTP server and http_backend process can lead to a dead-lock when relaying a large ref negotiation request. Diagnose the situation better, and mitigate it by reading such a request first into core (to a reasonable limit). * jk/http-backend-deadlock: http-backend: spool ref negotiation requests to buffer t5551: factor out tag creation http-backend: fix die recursion with custom handler
2015-06-16Merge branch 'jh/filter-empty-contents' into maintLibravatar Junio C Hamano2-1/+27
The clean/smudge interface did not work well when filtering an empty contents (failed and then passed the empty input through). It can be argued that a filter that produces anything but empty for an empty input is nonsense, but if the user wants to do strange things, then why not? * jh/filter-empty-contents: sha1_file: pass empty buffer to index empty file
2015-06-16Merge branch 'jk/stash-options' into maintLibravatar Junio C Hamano2-1/+20
Make "git stash something --help" error out, so that users can safely say "git stash drop --help". * jk/stash-options: stash: recognize "--help" for subcommands stash: complain about unknown flags
2015-06-16Merge branch 'mm/log-format-raw-doc' into maintLibravatar Junio C Hamano2-2/+14
Clarify that "log --raw" and "log --format=raw" are unrelated concepts. * mm/log-format-raw-doc: Documentation/log: clarify sha1 non-abbreviation in log --raw Documentation/log: clarify what --raw means
2015-06-16Merge branch 'ep/do-not-feed-a-pointer-to-array-size' into maintLibravatar Junio C Hamano1-1/+53
Catch a programmer mistake to feed a pointer not an array to ARRAY_SIZE() macro, by using a couple of GCC extensions. * ep/do-not-feed-a-pointer-to-array-size: git-compat-util.h: implement a different ARRAY_SIZE macro for for safely deriving the size of array
2015-06-16Merge branch 'nd/slim-index-pack-memory-usage'Libravatar Junio C Hamano1-2/+6
An earlier optimization broke index-pack for a large object transfer; this fixes it before the breakage hits any released version. * nd/slim-index-pack-memory-usage: index-pack: fix truncation of off_t in comparison
2015-06-16Merge branch 'sb/pack-protocol-mention-smart-http'Libravatar Junio C Hamano1-3/+3
Doc updates. * sb/pack-protocol-mention-smart-http: Documentation/technical/pack-protocol: mention http as possible protocol
2015-06-16Merge branch 'jk/make-fix-dependencies'Libravatar Junio C Hamano1-24/+25
Build clean-up. * jk/make-fix-dependencies: Makefile: silence perl/PM.stamp recipe Makefile: avoid timestamp updates to GIT-BUILD-OPTIONS Makefile: drop dependency between git-instaweb and gitweb
2015-06-16Merge branch 'jk/die-on-bogus-worktree-late'Libravatar Junio C Hamano2-10/+26
The setup code used to die when core.bare and core.worktree are set inconsistently, even for commands that do not need working tree. * jk/die-on-bogus-worktree-late: setup_git_directory: delay core.bare/core.worktree errors
2015-06-16Merge branch 'sg/merge-summary-config'Libravatar Junio C Hamano3-16/+12
Doc updates. * sg/merge-summary-config: Documentation: include 'merge.branchdesc' for merge and config as well
2015-06-16Merge branch 'ah/send-email-sendmail-alias'Libravatar Junio C Hamano3-2/+70
"git send-email" learned the alias file format used by the sendmail program (in an abbreviated form). * ah/send-email-sendmail-alias: t9001: write $HOME/, not ~/, to help shells without tilde expansion send-email: add sendmail email aliases format
2015-06-14Merge tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po ↵Libravatar Junio C Hamano1-5/+5
into maint l10n-2.4-maint-de-updates * tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po: l10n: de.po: translation fix for fall-back to 3way merge l10n: de.po: punctuation fixes l10n: de.po: grammar fix l10n: de.po: change error message from "sagen" to "Meinten Sie"
2015-06-12l10n: de.po: translation fix for fall-back to 3way mergeLibravatar Michael J Gruber1-1/+1
The English version is correct, but misleading: It is not the 3way merge that is being patched also, but that is being fallen back to also. The German version translates the former meaning. Make it translate the latter. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-12l10n: de.po: punctuation fixesLibravatar Michael J Gruber1-2/+2
This respects the ellipsis style used in de.po. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-12l10n: de.po: grammar fixLibravatar Michael J Gruber1-1/+1
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-12l10n: de.po: change error message from "sagen" to "Meinten Sie"Libravatar Phillip Sz1-1/+1
We should not use "sagen" if someone has written something wrong. Although it's "say" in English, we should not use it in German and instead use our normal error message. Signed-off-by: Phillip Sz <phillip.szelat@gmail.com> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-11Second half of seventh batchLibravatar Junio C Hamano1-0/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-11Merge branch 'tb/complete-sequencing'Libravatar Junio C Hamano1-0/+5
The bash completion script (in contrib/) learned a few options that "git revert" takes. * tb/complete-sequencing: completion: suggest sequencer commands for revert
2015-06-11Merge branch 'jk/squelch-missing-link-warning-for-unreachable'Libravatar Junio C Hamano7-9/+34
Recent "git prune" traverses young unreachable objects to safekeep old objects in the reachability chain from them, which sometimes caused error messages that are unnecessarily alarming. * jk/squelch-missing-link-warning-for-unreachable: suppress errors on missing UNINTERESTING links silence broken link warnings with revs->ignore_missing_links add quieter versions of parse_{tree,commit}
2015-06-11Merge branch 'pt/pull-tests'Libravatar Junio C Hamano2-36/+175
Add more test coverage to "git pull". * pt/pull-tests: t5520: check reflog action in fast-forward merge t5521: test --dry-run does not make any changes t5520: test --rebase failure on unborn branch with index t5520: test --rebase with multiple branches t5520: test work tree fast-forward when fetch updates head t5520: test for failure if index has unresolved entries t5520: test no merge candidates cases t5520: prevent field splitting in content comparisons
2015-06-11Merge branch 'sb/glossary-submodule'Libravatar Junio C Hamano1-0/+16
* sb/glossary-submodule: glossary: add "remote", "submodule", "superproject"
2015-06-11Merge branch 'sb/submodule-doc-intro'Libravatar Junio C Hamano1-28/+22
* sb/submodule-doc-intro: submodule doc: reorder introductory paragraphs